模糊功能未被调用

时间:2016-01-13 21:08:13

标签: javascript html onblur

我有以下用于通过电子邮件分享文章的代码

function internalLabelBlur(elm) {
    if (!elm.value) {
        elm.value = elm.defaultValue;
    }
    if (elm.value == elm.defaultValue) {
        elm.className = elm.className.replace("internal-label-emph", "internal-label");
    }
} // function internalLabelBlur(elm)

function internalLabelFocus(elm) {
    if (elm.value == elm.defaultValue) {
        elm.value = "";
    }
    elm.className = elm.className.replace("internal-label", "internal-label-emph");
} // function internalLabelFocus(elm)

function z_onclick() {
    return false;
}

标记:

<div id="emailErrEmailAddressArrow" class="errorarrow" style="visibility:hidden;">
    <img src="~/Content/Images/error_arrow_signup.png" alt="sign up error arrow">
</div>
<input id="txtEmailAddress" name="txtEmailAddress" class="internal-label inputbox" 
    onfocus="javascript:internalLabelFocus(this);"
    onblur="javascript:internalLabelBlur(this);" 
    onclick="return z_onclick()" type="text" value="E-mail address*" />

问题是没有调用onblur函数。任何人都可以帮我解释原因吗?

0 个答案:

没有答案