<html>
<script>
function starttouch(ev){
//procesar el evento
}
function init(){
var el=document.getelementbyid("target1");
el.ontouchstart = starttouch;
}
</script>
<body onload="init();">
<div id = "target1"> tocame...</div>
<div id ="target2" ontouchstart ="starttouch(event)">tocame... </div>
</body>
</html>
Este ejemplo muestra dos formas de utilizar ontouchstart para establecer un manejador de evento touchstart.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.