当前位置: 代码迷 >> ASP >> 下面是个调用JS函数网页跳转代码,运行时不跳转啊不知错哪里
  详细解决方案

下面是个调用JS函数网页跳转代码,运行时不跳转啊不知错哪里

热度:237   发布时间:2012-04-06 12:22:24.0
求助:下面是个调用JS函数网页跳转代码,运行时不跳转啊。不知错哪里?
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>龙涤中学学评教系统</title>
<link rel=stylesheet href="style.css" type="text/css">

<script type="text/javascript">
function check()
a=100
alert
{
var bjpassword=document.getElementById("banji");
var mima= new array()
var filenumber
var ok
mima[1]="3996";
mima[2]="5627";
mima[3]="1565";
mima[4]="9841";
mima[5]="6001";
mima[6]="8600";
mima[7]="6788";
mima[8]="9023";
mima[9]="2798";
mima[10]="7014";
mima[11]="4562";
mima[12]="1411";
mima[13]="7145";
mima[14]="3875";
mima[15]="1335";
mima[16]="6721";
mima[17]="6865";
mima[18]="8144";
mima[19]="9904";
mima[20]="4373";
mima[21]="8658";
mima[22]="2282";
mima[23]="1368";
mima[24]="8004";
mima[25]="4044";
mima[26]="6380";
mima[27]="7058";
mima[28]="9853";
mima[29]="4967";
mima[30]="3262";
mima[31]="7514";
mima[32]="8251";
mima[33]="8259";
mima[34]="6881";
mima[35]="6309";
mima[36]="9663";
mima[37]="6512";
mima[38]="3549";
mima[39]="1628";
mima[40]="5112";
alert(mima[39]);
for(i=1;i<=40;++i){if(mima[i]==bjpassword){filenumber=i;OK=1;break;}}
if(ok==1)
{var myurl='teacher-'+filenumber.value+'.asp';
var str = 'window.open("' + myurl + '")';
eval(str)
return true;
}
else
{alert("你输入的班级代码不对,请从新输入!");
return false;}
}
//-->
</script>

<style type="text/css">
<!--
.STYLE1 {
font-size: large;
color: #FF0000;
font-weight: bold;
font-family: "宋体";
}
body {
background-image: url(bg2003.gif);
}
.STYLE2 {font-family: "宋体"}
-->
</style>
</head>

<body topmargin="0">
<p>&nbsp;</p>
<p>&nbsp;</p>
<div align="center">
  <!--#include file="top.asp"--><div align="center">
  <center> </div>
  
  <table border="0" width="700" cellspacing="0" cellpadding="0">
  <tr> 
  <td width="100%"> <p>&nbsp;</p>
  <table width="90%" border="1" align="center" cellpadding="3" cellspacing="3" bordercolorlight="#008080" bordercolordark="#FFFFFF" id="b1">
  <!--DWLayoutTable-->
  <form action="" method="post" name="form" onSubmit="return check()">
  <tr> 
   
  <td width="457" height="27" valign="top"><span class="STYLE3">    <font color="#FF0000" size="4">     请输入你的班级密码:</font></span> 
  <input name="banji" type="password" id="banji" size="4" >
  相关解决方案