亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript cursor out-of-focus event (onblur)

Cursor out-of-focus event (onblur)


The onblur event is a relative event to onfocus. It is triggered when the cursor leaves the currently focused object. onblur event, while executing the called program.

The following example, when the cursor leaves, allows the user to confirm whether the information has been entered:

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>php.cn</title>
        <script>
            function fun(){
                window.alert("請(qǐng)確認(rèn)這是您的真實(shí)姓名")
            } 
        </script>
    </head>
    <body>
        <form>
            姓名:
            <input name="username" type="text" value="請(qǐng)輸入姓名" onblur="fun()" >
        </form>
    </body>
</html>


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script> function fun(){ window.alert("請(qǐng)確認(rèn)這是您的真實(shí)姓名") } </script> </head> <body> <form> 姓名: <input name="username" type="text" value="請(qǐng)輸入姓名" onblur="fun()" > </form> </body> </html>
submitReset Code