求助一个JS 的问题

feraner 2013-09-05 08:41:31
这是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是我输入文本框中的值,如果按上面的不会重定向。
...全文
198 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
feraner 2013-09-08
  • 打赏
  • 举报
回复
谢谢 问题解决了...
fzfei2 2013-09-06
  • 打赏
  • 举报
回复
你这是完整的页面,可以改用 iframe 来打开,或者你把没有的HTML头,body去掉就留你想要的片段的
feraner 2013-09-06
  • 打赏
  • 举报
回复

<!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 的脚本,,小白不懂了???求教
feraner 2013-09-06
  • 打赏
  • 举报
回复
引用 2 楼 u010719640 的回复:
document.getElementById("re3").value
就可以得到
这个和我说的又关系么???
fzfei2 2013-09-06
  • 打赏
  • 举报
回复
和 home-registration-step3.html 里 脚本 有关第
Deep_Learning 2013-09-06
  • 打赏
  • 举报
回复
document.getElementById("re3").value
就可以得到
feraner 2013-09-05
  • 打赏
  • 举报
回复
没人么???自己顶上来................

87,991

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧