<script type="text/javascript">
function sele(){

var an=document.getElementById("answer").value;
if(an=="A"||an=="B"||an=="C"||an=="a"||an=="b"||an=="c")


window.location.href="http://localhost/test/feng/index.html";


}
else{
alert("该选项不存在");
return false;
} }

</script>

解决方案 »

  1.   

    怎么调用的,首先确定进入if 还是else了。
      

  2.   

    看不出来有什么问题。你确定an的值取到了???另外,也不用写那么多条件var an=document.getElementById("answer").value.toLowerCase();
    alert(an);//你这里加这个语句,看看取到的是什么值
    if(an=="a" || an=="b" || an=="c"){
       window.location.href="http://localhost/test/feng/index.html";
    }else{
       alert("该选项不存在");
       return false;
    }
      

  3.   

    alert(an)能取到值,在 window.location.href="http://localhost/test/feng/index.html";这行下面加一句alert(an);用火狐就能跳转了,但是在360里,还是不能跳转
      

  4.   

    http://localhost/test/feng/index.html ==》http://127.0.0.1:(你的服务器端口)/test/feng/index.html
    try
      

  5.   

    answer 的html贴出来
    不然大家怎么帮你看 怎么帮你确定问题 
      

  6.   

    <html>
    <head>
    <title>关于我们</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body leftmargin=0 topmargin=0 onmousemove='HideMenu()'>
    <!-- 请输入您要设计的代码 -->
    <script language='javascript'>window.location.href='http://www.028wz.net/index.html';</script>
    </body>
    </html>