0
How do I make it spin ?
<html>
<head>
<script language="javascript">
function teste(){
alert("oi");
}
document.getElementById("as").onclick = function(){
teste();
}
</script>
</head>
<body>
<input type="button" id="as" value="AQUI">
</body>
</html>
But "this" you posted has html, you want to use without html?
– Fleuquer Lima
I expressed myself badly. I would like to know, actually, was : how to handle events without necessarily making use of EX: <body onload="//code">. Understood ?
– Rafael Anderson lobo
Recommend to use
setTimeout(function() { // CODE // }, 500);
...window.onload
does not run all version browsers.– KingRider