1
これは3秒の遅延で実行したいjavascriptコードです。 setTimeoutではどのように見えますか?前もって感謝します!setTimeoutをdocument.body.addEventListenerに追加するにはどうすればいいですか?
<script type="text/javascript">
document.body.addEventListener('click', myFunction);
function myFunction() {
if (window.location.href.indexOf('3124') <= -1) {
window.open('http://example.net/1_of_3/file_5444','mywindow2','width=1600,height=1200');
document.body.removeEventListener('click', myFunction);
}
}
</script>
そんなに私の友人をありがとう!それはうまくいった! :) – vijikey