Javascript Form - 如何處理焦點(diǎn)丟失事件為文件上傳輸入框
我們想知道如何處理焦點(diǎn)丟失事件為文件上傳輸入框。
<html>
<body>
<script language="JavaScript">
function inform(){
document.form1.msg.value="File submitted and focus removed from FileUpload object";
}
</script>
<form name="form1">
Please choose a file to upload to the server.
<br><br>
<input type="file" onBlur= 'inform()'>
<br><br>
Click on the text box.
<br><br>
Message:
<input type="text" name="msg" size="50">
</form>
</body>
</html>
The code above is rendered as follows: