[php] 입력된 값이 있어야만 버튼 활성화 시키기
페이지 정보
본문
<form name="flogin" method="post" onsubmit="return flogin_submit(this);">
<input type="hidden" name="url" value='<?=$url?>'>
<!-- memberskin_outbox -->
<div class="loginskin">
<ul>
<li class="error">IDまたはパスワードが正しくありません。</li>
</ul>
<!-- login_left -->
<ul>
<li>USERNAME<span class="form-required" title="This field is required.">*</span></li>
<li><input type=text name="mb_id" id="mb_id" itemname="USERNAME" onchange='proces()' /></li>
</ul>
<ul>
<li>PASSWORD<span class="form-required" title="This field is required.">*</span></li>
<li><input type="password" name="mb_password" id="login_mb_password" name="login_mb_password" itemname="PASSWORD" onchange='proces()' /></li>
<div style="padding:20px 0; text-align:center;">
<input type="submit" id="btn_submit" name="btn_submit" accesskey='s' value="ログイン">
<input type="button" value='新規会員登録' onclick="document.location.href='./register.php';">
<br /><a href="./password_forget.php">ID、パスワードがわからない方はこちら</a>
</div>
<div style="clear:both; text-align:left;">
メンバーにご登録頂きますと、お客様情報の確認・変更など更に便利にご利用できます。
</div>
<!-- memberskin_outbox -->
</div>
</form>
<script language="javascript">
<!--
document.flogin.btn_submit.disabled = true;
document.onkeyup = proces;
document.onmouseup = proces;
document.onmousedown = proces;
function proces() {
if (document.flogin.mb_id.value == '') {
document.flogin.btn_submit.disabled = true;
} else {
document.flogin.btn_submit.disabled = false;
}
if (document.flogin.login_mb_password.value == '') {
document.flogin.btn_submit.disabled = true;
} else {
document.flogin.btn_submit.disabled = false;
}
}
//-->
</script>
<input type="hidden" name="url" value='<?=$url?>'>
<!-- memberskin_outbox -->
<div class="loginskin">
<ul>
<li class="error">IDまたはパスワードが正しくありません。</li>
</ul>
<!-- login_left -->
<ul>
<li>USERNAME<span class="form-required" title="This field is required.">*</span></li>
<li><input type=text name="mb_id" id="mb_id" itemname="USERNAME" onchange='proces()' /></li>
</ul>
<ul>
<li>PASSWORD<span class="form-required" title="This field is required.">*</span></li>
<li><input type="password" name="mb_password" id="login_mb_password" name="login_mb_password" itemname="PASSWORD" onchange='proces()' /></li>
<div style="padding:20px 0; text-align:center;">
<input type="submit" id="btn_submit" name="btn_submit" accesskey='s' value="ログイン">
<input type="button" value='新規会員登録' onclick="document.location.href='./register.php';">
<br /><a href="./password_forget.php">ID、パスワードがわからない方はこちら</a>
</div>
<div style="clear:both; text-align:left;">
メンバーにご登録頂きますと、お客様情報の確認・変更など更に便利にご利用できます。
</div>
<!-- memberskin_outbox -->
</div>
</form>
<script language="javascript">
<!--
document.flogin.btn_submit.disabled = true;
document.onkeyup = proces;
document.onmouseup = proces;
document.onmousedown = proces;
function proces() {
if (document.flogin.mb_id.value == '') {
document.flogin.btn_submit.disabled = true;
} else {
document.flogin.btn_submit.disabled = false;
}
if (document.flogin.login_mb_password.value == '') {
document.flogin.btn_submit.disabled = true;
} else {
document.flogin.btn_submit.disabled = false;
}
}
//-->
</script>
추천0
관련링크
-
http://blue.iegate.net/
3016회 연결