Skip to content


javascript form input disabled フォームの入力を不可にする。

input タグの入力を無効にする。

サンプルURL

http://kimson.name/memo/form/

===========================================

htmlソース index.html
===========================================

Sample form

=======================================================

javascript ソース func.js

=======================================================

//登録ボタンの入力可、不可を切り替える

function swSubmit(){

if(document.getElementById(”form1″).submit.disabled){
document.getElementById(”form1″).submit.disabled = false;
}else{
document.getElementById(”form1″).submit.disabled = true;
}

}

//テキスト入力の可、不可を切り替える

function swText(){

if(document.getElementById(”form1″).textinput.disabled){
document.getElementById(”form1″).textinput.disabled = false;
}else{
document.getElementById(”form1″).textinput.disabled = true;
}
}

====================================================

Posted in html, javascript. Tagged with , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(never shared)

or, reply to this post via trackback.