- 分享
- 0
- 人气
- 0
- 主题
- 2
- 帖子
- 27
- UID
- 344207
- 积分
- 18
- 阅读权限
- 11
- 注册时间
- 2010-8-23
- 最后登录
- 2013-7-2
- 在线时间
- 35 小时

|
if ( ! checkUnique('user_new_nric', $_POST['user_new_nric']) )
{
echo '<script = "JAVASCRIPT">alert("The new NRIC you used is associated with another user. Please try again!")
</script>';
}
请在user_new_nric的input 加上 id, eg:
<input type="text" name="user_new_nric" id="user_new_nric" value="" />
Javascript 部分:
<script type="text/javascript">
document.getElementById("user_new_nric").focus();
</script>. 请把这部分的code放置在<input type="user_new_nric" />出现之后。Error:'document.subAgent.user_new_nric' is null or not an object 的问题是因为你在<input />之前,放入<script>,这样js 这么可能找到<input />? |
|