, ,
, <q>, <samp>, <select>, <small>, <span>,<strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>,<th>, <thead>, <tr>, <tt>, <ul>, <var><br/></p><p>支持该事件的 JavaScript 对象:</p><p>button, checkbox, fileUpload, layer, frame, password,radio, reset, submit, text, textarea, window<br/></p><p>实例:</p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:js;toolbar:false"><html>
<head>
<script type="text/javascript">
function upperCase()
{
var x=document.getElementById("fname").value
document.getElementById("fname").value=x.toUpperCase()
}
</script>
</head>
<body>
Enter your name: <input type="text" id="fname" onblur="upperCase()"><br />
Enter your age: <input type="text" id="age" onblur="alert(this.id)">
</body>
</html>
Salin selepas log masuk