我正在开发一个网站,目前我坚持注册过程。当我要求用户注册我的网站时,他们需要选择一个团队的人数。当我在选择框中选择人数时,我的网站会根据我选择的人数显示输入字段。这适用于Mozilla Firefox(Mozilla/5.0(X11; U; Linux x86_64; en-US; rv:1.9.2.24)Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24)。我的jquery脚本只适用于mozilla。 Chrome浏览器,IE浏览器,Safaria和Opera不能用我的jQuery
尽管如此,其他网络浏览器并不根据我选择的人数显示输入字段。
这是下面的代码:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#muestra1").click(function(){
$("#loscuatro").hide();
});
});
$(document).ready(function(){
$("#muestra2").click(function(){
$("#loscuatro").show();
});
});
</script>
</head>
<body>
<div id="container" class="ltr">
<li><span>
<div id="container" class="ltr">
<h2>Please give us your name</h2>
<ul>
<li>
<span>
Number of team members <select name="integrantes" id="integrantes" >
<option name="member1" value="1" id="muestra1" >1</option>
<option name="member2" value="2" id="muestra2">2</option>
</li><hr /></span>
<b><h3>Leader</h3></b>
<li>
<span>
Name* <input id="Field0" /></span>
</li><hr />
<div id="loscuatro">
<b><h3>Volunteer</h3></b>
<li>
<span>
Name* <input id="Field0" /></span>
</li><hr />
</div><!--end of volunteer loscuatros-->
</div>
</body>
</html>
请,我会很高兴收到支持这一代码,因为我已经看了好几遍,我无法找到的bug。我说这不是我注册部分的最终设计。
干杯。
李应UL或OL里面,你有很多外面混有其它元素! ..和$(文件)。就绪功能应该结合,因为这是多余的,他们将工作作为一个在年底 – CME64
HTML标签的嵌套是不妥当的 –