Función js de llamada de botón html

Ejemplos de código

13
0

botón onclick de javascript

var button = document.querySelector('button');
button.onclick = function() {
  //do stuff
}
12
0

javascript onclick

var myElem = document.getElementByID('ElemID');
myElem.onclick = function() {
	//do stuff
}
7
0

onclick una etiqueta

<a href='http://www.google.com' onclick='return check()'>check</a>

<script type='text/javascript'>
function check() {
    return false;
}
</script>
4
0

función de clic de botón en js

<script>
  $(document).ready(function(){
    $('#MyButton').click(function(){
       CapacityChart();
    });
  });
</script>

<input type="button" value="Capacity Chart" id="MyButton" >
1
0

cómo llamar a una función con un botón en javascript

<script>
		function myFunction()
		{
			document.write("<h1>HELLO</h1>")
		}
	</script>
<button onclick="myFunction()">Click</button>
0
0

función de llamada al hacer clic en html

  <img src="hospital.png" id="hospitals" onclick="damarkers();">

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................