1
我一直在注册页面上工作。当我离线测试它时,一切似乎都很好,但是当我上传页面时,div的show-hide的jQuery代码不再工作。简单的jQuery不在PHP在线页面工作
这里是我的代码:
<input type="checkbox" id="list" value="1" onchange="valueChanged()"><label>Include me in your mailing list</label>
<div id="group" style="display:none;">
<input type="checkbox"><label>Turf</label><br>
<input type="checkbox"><label>Landcare</label><br>
<input type="checkbox"><label>Landscaping</label><br>
<input type="checkbox"><label>Landscaping Architects</label><br>
<input type="checkbox"><label>Nurseries</label>
</div>
这里是jQuery脚本
<script type="text/javascript">
function valueChanged()
{
if($('#list').is(":checked"))
$("#group").show(300);
else
$("#group").hide(300);
$("#group").children().prop('checked', false);
}
</script>
我也有一个验证码在内,会不会影响我的代码?
调试控制台中的任何错误? –
使用开发工具检查错误(Windows中的f12) –
似乎没有。我会在稍后检查,我会和我的老板见面。非常感谢你们 – Jnpkz