id4689 Posted December 13, 2011 Report Share Posted December 13, 2011 Olá galera,preciso simular o click do mouse em uma página em branco sem objeto isso é possivel, como ?é urgente galera... Quote Link to comment Share on other sites More sharing options...
0 vini_loock Posted December 13, 2011 Report Share Posted December 13, 2011 Já tentou isso?document.body.onclick = function(){ //your code here?? } Quote Link to comment Share on other sites More sharing options...
0 id4689 Posted December 13, 2011 Author Report Share Posted December 13, 2011 (edited) funfou não cara<script type="text/javascript"> function whichButton(event) { if (event.button==2) { alert("You clicked the right mouse button!") } else { alert("You clicked the left mouse button!") } } setInterval(document.body.onclick = function(){ alert("fui clicado"); },300); </script>tá certo ?sem element sem objeto não funciona... Edited December 13, 2011 by id4689 Quote Link to comment Share on other sites More sharing options...
0 id4689 Posted December 13, 2011 Author Report Share Posted December 13, 2011 consegui fasendo desta forma<html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> </head> <body> <script type="text/javascript"> $('body').click(function() { $('body').trigger('click'); // do something here like: alert('hey! The body click is working!!!') }); </script> </body> </html>no entanto só funciona no iexplorer 9 aqui testado, outros navegadores ff e chrome não funciona.. e agora oque eu faço ? Quote Link to comment Share on other sites More sharing options...
0 id4689 Posted December 13, 2011 Author Report Share Posted December 13, 2011 (edited) resolvido:<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> $('body').click(function(){ alert('hey! The body click is working!!!') }); $('body').trigger('click'); </script> Edited December 13, 2011 by id4689 Quote Link to comment Share on other sites More sharing options...
Question
id4689
Olá galera,
preciso simular o click do mouse em uma página em branco sem objeto isso é possivel, como ?
é urgente galera...
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.