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
WBOYOriginal
2016-06-24 12:23:331133browse

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"/>

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


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"/>

 document.getElementById('oc_phone').disabled = "disabled";

Like this

 document.getElementById('oc_phone').disabled = "disabled";

Like this
Well thank you

Statement:
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