,但我得到一個錯誤類型錯誤:未定義沒有(評估構造「document.querySelector(「輸入[名稱=‘提交’ ]「)
,這是HTML代碼:
<div id="myTabContent" class="tab-content">
<div class="set-loginbx-active" id="b2b">
<form name="form1" method="post" onSubmit="return HC.checkMode(this);">
<div id="lyAgent">
<div class="lbl-login" id="dAgentID">Agent Id.</div>
<div class="inp-login"><input name="txtID" id="txtID" type="text"></div>
<div class="clear"></div>
</div>
<div class="lbl-login" id="dUserName">Username</div>
<div class="inp-login"><input name="txtUserName" id="txtUserName" type="text"></div>
<div class="clear"></div>
<div class="lbl-login" id="dPassword">Password</div>
<div class="inp-login">
<input name="txtPassword" id="txtPassword" type="password">
<input type="hidden" name="txtMode" id="txtMode" value="1" />
<input type="hidden" name="txtLang" id="txtLang" value="en" />
</div>
<div class="clear"></div>
<div class="btn-login"><input name="submit" type="submit" value="LOGIN" /></div>
<div class="box-access">
<div class="tt-access">Access Level</div>
<div class="lnk-access"><input type="radio" name="optionsRadios" id="optionsRadios1" onclick="HC.loginMode(1);"> Master Login</div>
<div class="lnk-access"><input type="radio" name="optionsRadios" id="optionsRadios2" checked onclick="HC.loginMode(0);"> Agent Login</div>
</div>
</form>
</div>
可有人向我解釋爲什麼
嘗試'輸入[類型= 「提交」]'。此外,添加相應的HTML cod.e – Tushar
還是不行@Tushar – Herdy