入力フォームで、checkボックスにチェックを入れるとINPUTボックスの【zip2・address02・name02・person02・telephone02】が 入力不可にしていますが、 (1)この記述を、外部jsにしたいのですがやり方がわかりません。 (2)また、入力ファームで、チェックを入れ確認画面に進んだ後、前画面に戻るボタンをで入力フォームに戻ったとき チェックボックスには、チェックが入っているのですが、【zip2・address02・name02・person02・telephone02】が 入力が有効の状態に戻ってしまいます。何か良い方法はないでしょうか。 よろしくお願いいたします。 <script type="text/javascript"> <!-- function check(){ if(arguments[0].checked){ for (i = 1; i < arguments.length; i++){ document.getElementById(arguments[i]).disabled=true; document.getElementById(arguments[i]).style.backgroundColor = "#dddddd"; document.getElementById(arguments[i]).className="disabl"; document.form.requestday03.focus(); } } else{ for (i = 1; i < arguments.length; i++){ document.getElementById(arguments[i]).disabled=false; document.getElementById(arguments[i]).className=""; document.form.zip2.style.backgroundColor = "#ffffff"; document.form.zip2.style.border = "1px solid #abadb3"; document.form.address02.style.backgroundColor = "#ffffff"; document.form.address02.style.border = "1px solid #abadb3"; document.form.name02.style.backgroundColor = "#ffffff"; document.form.name02.style.border = "1px solid #abadb3"; document.form.person02.style.backgroundColor = "#ffffff"; document.form.person02.style.border = "1px solid #abadb3"; document.form.telephone02.style.backgroundColor = "#ffffff"; document.form.telephone02.style.border = "1px solid #abadb3"; } } } // --> </script>
↧