
代码如下:
script>
$(function () {
var $txtNote = $("#txtNote");
var $divTips = $("#divTips");
$txtNote.focus(function () {
//置焦点时隐藏
$divTips.hide();
}).blur(function () {
//离开时, 如果为空则显示,否则隐藏. 然后定位
$divTips.toggle($txtNote.val() == "")
.css({
"left": $txtNote.position().left,
"top" : $txtNote.position().top
});
});
$divTips.click(function () {
$txtNote.focus();
});
$txtNote.blur();
});
script>
留言板
亲,欢迎访问,有什么说的就写下来吧!!
(在下面的框框中留下您的name, 方便的话请留下您的联系方式)