<scrip>
function checkacc(user){
<?php
do{
?>
if(user == '<?php echo $row_myusers["user_name"]; ?>'){
document.target.user_name.value = '帳號重複!';
document.target.user_name.style.color = '#FF0000';
return false;
}
<?php
} while($row_myusers = mysql_fetch_assoc($myusers));
?>
}
</scrip>
<input type="text" name="user_name" id="user_name" class="text03" onfocus="this.style.color = '#000000'" onblur="checkacc(this.value);" />
<input name="send1" type="submit" id="send1" onclick="if(document.target.user_name.value == '帳號重複!'){alert('*請輸入使用者帳號');return false;}"value="送出" />
沒有留言:
張貼留言