Home > Web Front-end > HTML Tutorial > Experts can help me take a look at why there is an error when calling the input of this radio button? _html/css_WEB-ITnose

Experts can help me take a look at why there is an error when calling the input of this radio button? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:08:35
Original
1015 people have browsed it

代码1:


    
      
    
    
      
我的收款方式:
银行/支付宝 
    邮局   我的姓名:
type="text" id="name" value="传月刚" maxlength="20" style="width: 55px" disabled />

        
帐号地址: 
             
id="bank" value="支付宝:4635634@qq.com">
        



It is necessary to disable input. If input can be input, this code will run correctly:


Code 2:






My payment method:
Bank/Alipay
Post Office My name:
type="text" id="name" value="chuanyuegang" maxlength="20" style="width: 55px" disabled />


Code 2 can run correctly. Who can help me debug code 1? ! Thanks! Input is required to run correctly in the disabled state.



Reply to discussion (solution)
Bank/Alipay



id It is best not to reuse

<form name="AddUserForm" method="post" action="pay.php?t=2" id="form2"><table style="width:100%;" cellspacing="0" border="1">   <tr>   <td>我的收款方式: <input type="radio" name="xtmod" value="bank" checked onClick="Div2.style.visibility='visible';Div1.style.visibility='hidden'">银行/支付宝    <input type="radio" name="xtmod" value="address" onClick="Div2.style.visibility='hidden';Div1.style.visibility='visible'">邮局 我的姓名:<input name="name"  type="text" id="Text1" value="传月刚" maxlength="20" style="width: 55px" disabled /><input type="hidden" name="name" id="name" value="传月刚"></td>   </tr>   <tr>   <td><div id='Div1' style='position:absolute; visibility: hidden'>帐号地址:    <input name="address" type="text" id="address" value="408403重庆市南川市水江镇" maxlength="100" style="width: 600px" disabled /><input type="hidden"  name="address" id="address" value="408403重庆市南川市水江镇">    </div>   <div id='Div2' style='visibility: visible'>帐号地址:    <input name="bank" type="text" id="bank" value="支付宝:4635634@qq.com" maxlength="100" style="width: 600px" disabled /><input type="hidden" name="bank"  id="bank" value="支付宝:4635634@qq.com">   </div>  <tr></table></form>
Copy after login
HTML code

id It is best not to reuse



but the error still occurs in the Firefox browser. It works under IE6. Can you help me check again?

Quoting the reply from zsx841021 on the 2nd floor:
HTML code

id It is best not to reuse


The error still occurs in Firefox browser, but it can be done under IE6 Yes, can you help me take another look?
Then use the method on the first floor. . . Writing like Div2.style cannot achieve compatibility, document.getElementById('div1') can

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template