window.location.href="http://www.163.com"

解决方案 »

  1.   

    <script type='text/javascript'>function Myinfor(){  //Myinfor函数 
    var currentMonth ; 
    currentMonth=new Date().getMonth();//将月份赋值给变量 
    if (currentMonth>8 && currentMonth <11) {    //判断月份是否是9月或10月 
    window.location.href="http://www.163.com"; 
    else{ 
    alert("请在规定的时间内注册!"); 
    window.location.href="http://www.baidu.com";                                 

    } window.onload=Myinfor;
    </script>
      

  2.   

    怎么还不行??报错? 不能链接过去?if (currentMonth==8 || currentMonth ==9) {    //判断月份是否是9月或10月  这句改改