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