输入框问题

function inputFocus(t) {
    t.bind({
        focusin: function () {
            t.val() == t.attr("tipsValue") && t.val("")
        }, focusout: function () {
            "" == t.val() && t.val(t.attr("tipsValue"))
        }
    })
}
tipsValue="姓    名" value="姓    名"

输入框模拟placeholder。

猜你喜欢

转载自www.cnblogs.com/pengxiangchong/p/11671199.html