Javascript event never triggering

I am working on a signup for the mailing list and an trying to make the page and js file not be cached by the browser. Thus, I use a fake query string. I am trying to get the page to make a new query string when it is refreshed. It doesn't work... why? I think the line: window.onbeforeunload=changeNoCache(); is in the wrong place. Email Sign-Up Email Address: SignUp.js: function makePopUp() { div = document.getElementById("shell"); if(!div) { email = document.getElementById("email").value; popupshell = document.createElement("div"); popupinner = document.createElement("div"); popupshell.id = "shell"; popupinner.id = "inner"; popupinner.innerHTML = "x
Thank You. Would you like to enter other information so that we can make your emails more relevant? If so, enter your information below. Otherwise, you may click the x button in the top right of this window to close it.

Email:
First Name:
Last Name:
Country Code: Phone Number:
Company Name:
Serial Number:

"; popupshell.appendChild(popupinner); document.body.appendChild(popupshell); } else { blink(div); t = setTimeout("blink(div);",100); t = setTimeout("blink(div);",200); t = setTimeout("blink(div);",300); t = setTimeout("blink(div);",400); t = setTimeout("blink(div);",500); } } function blink(element) { (element.style.display=='none') ? element.style.display='block' : element.style.display='none'; } function validatePhone() { cc = document.getElementById("countrycode"); number = document.getElementById("number"); cc.value = cc.value.replace(/\D/g,""); number.value = number.value.replace(/\D/g,""); } function closePopUp() { document.body.removeChild(document.getElementById("shell")); }
i used to have it triggering endlessly but now it doesnt trigger at all.

以上就是Javascript event never triggering的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏