这是js文件代码function register_step2(){
/*为什么填值了就不可以
first_name=$("#re3").val();
last_name=$("#re4").val();
username=$("#re5").val();
email=$("#re23").text();
location=$("#re6").val();
timezone=$("#re7").val();
phone=$("#re8").val();
conpany=$("#re9").val();
//window.alert(email+" "+first_name+" "+timezone);
if(first_name=="" || last_name=="" || username=="" || email=="" || timezone==""){
window.alert("FirstName,LastName,UserName,Email,Timezone CANNOT be empty!");
$("#re3").val(first_name);
return;
}
*/ $("#sign_indiv").empty();
$("#sign_indiv").load("jquery-lightbox/home-registration-step3.html");
}
这是调用的的html代码 <div class="clear"></div> <input type="submit" value="" onclick="register_step2();" class="next-button" /> <div class="clear"></div>为什么把JS 里面的注释去掉地址就会重定向到根目录下,而且你输入的是什么就会有http://localhost:8080/MyMedex/F 这个f是我输入文本框中的值,如果按上面的不会重定向。javascript重定性怪问题
/*为什么填值了就不可以
first_name=$("#re3").val();
last_name=$("#re4").val();
username=$("#re5").val();
email=$("#re23").text();
location=$("#re6").val();
timezone=$("#re7").val();
phone=$("#re8").val();
conpany=$("#re9").val();
//window.alert(email+" "+first_name+" "+timezone);
if(first_name=="" || last_name=="" || username=="" || email=="" || timezone==""){
window.alert("FirstName,LastName,UserName,Email,Timezone CANNOT be empty!");
$("#re3").val(first_name);
return;
}
*/ $("#sign_indiv").empty();
$("#sign_indiv").load("jquery-lightbox/home-registration-step3.html");
}
这是调用的的html代码 <div class="clear"></div> <input type="submit" value="" onclick="register_step2();" class="next-button" /> <div class="clear"></div>为什么把JS 里面的注释去掉地址就会重定向到根目录下,而且你输入的是什么就会有http://localhost:8080/MyMedex/F 这个f是我输入文本框中的值,如果按上面的不会重定向。javascript重定性怪问题
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Medeo Linx</title>
<link rel="stylesheet" type="text/css" href="./css/style.css" />
</head>
<body> <div id="home-registration-step1">
<div class="topbg"></div>
<div class="centerbg">
<div class="innerbox"> <div class="topheading">Complete my registration on MyMedex</div>
<div class="">
<img src="./images/registrations-step3-image.jpg" />
</div> <div id="registration-notifications-box"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6%">
<input type="radio" value="yes" id="re10" name="send_or_no"/>
</td>
<td width="62%" class="sendbox1">Send me notifications when ...</td>
<td width="21%" align="center" class="sendbox1">
<span>Email</span>
<img src="./images/email-icon.jpg" align="absmiddle" />
</td>
<td width="11%" align="center" class="sendbox1">
<span>SMS</span>
<img src="./images/sms-con.jpg" align="absmiddle" />
</td>
</tr>
<tr>
<td> </td>
<td>Updates available on my subscribed project files</td>
<td align="center">
<input type="checkbox" id="re11" />
</td>
<td align="center">
<input type="checkbox" id="re12" />
</td>
</tr>
<tr>
<td> </td>
<td>Someone leaves me a comment or replies to my comment</td>
<td align="center">
<input type="checkbox" id="re13"/>
</td>
<td align="center">
<input type="checkbox" id="re14"/>
</td>
</tr>
<tr>
<td> </td>
<td>Someone leaves a comment on my subscribed project</td>
<td align="center">
<input type="checkbox" id="re15"/>
</td>
<td align="center">
<input type="checkbox" id="re16"/>
</td>
</tr>
<tr>
<td> </td>
<td>Someone send me a message</td>
<td align="center">
<input type="checkbox" id="re17"/>
</td>
<td align="center">
<input type="checkbox" id="re18"/>
</td>
</tr>
<tr>
<td> </td>
<td>I receive a shared project or content</td>
<td align="center">
<input type="checkbox" id="re19"/>
</td>
<td align="center">
<input type="checkbox" id="re20"/>
</td>
</tr>
<tr>
<td> </td>
<td>MyMedex site has new features</td>
<td align="center">
<input type="checkbox" id="re21"/>
</td>
<td align="center">
<input type="checkbox" id="re22"/>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td>
<input type="radio" value="no" name="send_or_no"/>
</td>
<td class="sendbox1">Do not send me any notifications.</td>
<td align="center"> </td>
<td align="center"> </td>
</tr> </table>
<input type="submit" value="" class="done-button" onclick="register_step3();" />
<div class="clear"></div>
</div> </div> </div>
<div class="bottombg"></div> </div></body>
</html>这是home-registration-step3.html 的脚本,,小白不懂了???求教