add button to perform function

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick

<!DOCTYPE html>
<html>
<body>

<p>Click the button to trigger a function that will output "Hello World" in a p element with id="demo".</p>

<button onclick="myFunction()">Click me</button>

<p id="demo"></p>

<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>

</body>
</html>

  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

able to click on different parts of the image! so cool!

this html can use for clicking different part of the same image!   <img src="planets.gif"...

set where the a href opens at, new windows etc..

<a href="https://jidhost.com" target="_blank"> ValueDescription _blank Opens the...

database commands

from https://codeigniter.com/userguide2/database/active_record.html...

php excel, how to set clickable url

$this->phpExcelObj->getActiveSheet()->setCellValueExplicit('‌​A1', $id,...

For online form capture multimedia on mobile devices

<p>Capture Image: <input type="file" accept="image/*" id="capture" capture="camera">...