本文介绍了javascript条款和条件脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好,请各位大家将这些代码组合成一个并使其正常工作 < SCRIPT LANGUAGE =JavaScript> <! - 函数GetCookie(名称){ var arg = name +=; var alen = arg.length ; var clen = document.cookie.length; var i = 0; while(i< clen){ var j = i + alen; if(document.cookie.substring(i,j)== arg) 返回here; i = document.cookie.indexOf(,i)+1; if(i == 0)break; } 返回null; } var visit = GetCookie(ZZZZZ); if(visit == null) { alert(你的消息在这里,你只能看到它一次!); var expire = new Date( ); expire = new Date(expire.getTime()+ 7776000000); document.cookie =ZZZZZ = here; expires =+ expire; } // - > < / SCRIPT> 代码2 var answer = confirm(请点击确定继续加载我的页面,或取消即可导向雅虎网站。) if(!answer) window.location =http://www.yahoo.com/Hi could you please guys combine these codes into one and make it work<SCRIPT LANGUAGE="JavaScript"><!--function GetCookie(name) { var arg=name+"="; var alen=arg.length; var clen=document.cookie.length; var i=0; while (i<clen) { var j=i+alen; if (document.cookie.substring(i,j)==arg) return "here"; i=document.cookie.indexOf(" ",i)+1; if (i==0) break; } return null;}var visit=GetCookie("ZZZZZ");if (visit==null){ alert("Your Message Goes here and you only get to see it once!"); var expire=new Date(); expire=new Date(expire.getTime()+7776000000); document.cookie="ZZZZZ=here; expires="+expire;}// --></SCRIPT>code 2var answer = confirm ("Please click on OK to continue loading my page, or CANCEL to be directed to the Yahoo site.")if (!answer)window.location="http://www.yahoo.com/"推荐答案 这篇关于javascript条款和条件脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 23:17