var Page_INIT = function () {
$(document). bind("mouseover", function (e) {//mouse moves into
if (e.target.tagName.toUpperCase() == "INPUT") {
var input = e.target;
if (input.type == "text") {//If it is a text box
if (window.Page_FocusTimer) {//If it is in the focus state
window.clearTimeout(window.Page_FocusTimer);//Clear the focus state
}
window.Page_FocusTimer = window.setTimeout(function () { //Execute this anonymous method every 0.2 milliseconds
if (!input.value) {//If the content is empty , then set as focus
try {
input.focus();
} catch (e) { }
}
}, 200);
}
}
}).bind("mouseout", function (e) {//Mouse out
if (e.target.tagName.toUpperCase() == "INPUT") { //The event source object being processed If the name (i.e. HTML tag) is converted to uppercase, it will be INPUT
var input = e.target;
if (input.type == "text") {
if (window.Page_FocusTimer) {
window.clearTimeout(window.Page_FocusTimer);
}
}
}
});
}