JavaScript/フォーム入力支援
をテンプレートにして作成
Search in
this wiki
and
or
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*** フォーカス自動移動
1つのBoxの入力が終わったら、次のBoxへフォーカスを移しま...
こういう細かいサポートって、結構重要だったりしますよね?
movefocus.htm
<script language="JavaScript"><!--
function moveFocus(own, nextElement) {
if (own.value.length == own.maxLength) {
nextElement.focus();
}
}
//--></script>
<form name="form1" method="get">
<input type="text" size="4" maxlength="4" name="input1"
onkeyup="moveFocus(this, this.form.input2);"><br />
<input type="text" size="4" maxlength="4" name="input2">
</form>
終了行:
*** フォーカス自動移動
1つのBoxの入力が終わったら、次のBoxへフォーカスを移しま...
こういう細かいサポートって、結構重要だったりしますよね?
movefocus.htm
<script language="JavaScript"><!--
function moveFocus(own, nextElement) {
if (own.value.length == own.maxLength) {
nextElement.focus();
}
}
//--></script>
<form name="form1" method="get">
<input type="text" size="4" maxlength="4" name="input1"
onkeyup="moveFocus(this, this.form.input2);"><br />
<input type="text" size="4" maxlength="4" name="input2">
</form>
ページ名: