您好,並提前感謝您的任何幫助 在我的商店頁面,我有一個複選框,當用戶同意條款時進行檢查。當他檢查複選框時,提交按鈕被禁用(false)。我的問題是,這個解決方案不適用於iPhone和其他移動設備。複選框與JS和移動
下面的代碼:
function terms() {
if (document.getElementById("cbTerms").checked)
document.getElementById("submit").disabled = false;
else
document.getElementById("submit").disabled = true;
}
function cbc() {
if (document.getElementById("cbc").checked)
document.getElementById("cbc") = ("הריני מאשר קבלת מבצעים והטבות אל הדואר האלקטרוני מפראיה");
else
document.getElementById("cbc").value = ".";
}
<input class="btn btn-toranj alt" name="submit" type="submit" id="submit" value="לרכישה" disabled="true">
<br>
<br>
<input type="checkbox-0" id="cbTerms" name="cbTerms" onclick="terms();" style="width:15px; height:15px;">
<p style="margin-bottom:0px; font-size:14px; display: -webkit-inline-box;">הריני מאשר כי קראתי את <a href="regulations.html" style="color:#E49D1F;">התקנון</a>
</p>
<br>
<input type="checkbox" id="cbc" name="os3" oninput="cbc()" style="width:15px; height:15px;">
<p style="margin-bottom:0px; font-size:14px; display: -webkit-inline-box;">הריני מאשר קבלת מבצעים והטבות אל דואר האלקטרוני</p>
<input type="hidden" value="הטבות ומבצעים" id="on3" name="on3">
DKSan複選框爲的複選框-0是一些答案,我覺得在「移動複選框」的網頁。 Bellash我將代碼替換爲您提供的代碼並且沒有任何更改,但它仍然可以在網絡上使用,但歡迎您查看:www.praia.co.il/praiamoro.html,但通過移動設備無法使用。 –