Home > Web Front-end > HTML Tutorial > js control button click problem_html/css_WEB-ITnose

js control button click problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:23:33
Original
1130 people have browsed it

The following is the code, why is it useless?

<input type="text" id="phones" /><input type="button" value="发送验证码" onclick="phone_Change('2k3R4ru')" id="oc_phone"/>
Copy after login

function phone_Change(t){	 document.getElementById('oc_phone').disabled=false;}
Copy after login


Reply to discussion (solution)

Do you want to disable the button?

无标题文档<input type="text" id="phones" /><input type="button" value="发送验证码" onclick="phone_Change('2k3R4ru')" id="oc_phone"/>
Copy after login

 document.getElementById('oc_phone').disabled = "disabled";
Copy after login
Copy after login

Like this

 document.getElementById('oc_phone').disabled = "disabled";
Copy after login
Copy after login

Like this
Well thank you

Related labels:
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