没明白你意思,这是我的代码<script type="text/javascript">
$(function(){
$(".txt").focus(function(){
$(".tip").show();
});
$(".tip").click(function(){
$(this).hide();
});
});
</script>
$(function(){
$(".txt").focus(function(){
$(".tip").show();
});
$(".tip").click(function(){
$(this).hide();
});
});
</script>
$(function(){
$(".txt").focus(function(){
$(".tip").show();
});
$(".tip").click(function(){
$(this).hide();
});
});
</script>
$(function(){
var txtfocus=false;
$(".txt").focus(function(){
if(!txtfocus){//blur后获取到焦点再显示tip
txtfocus=true
$(".tip").show();
}
}).blur(function(){txtfocus=false});
$(".tip").click(function(){
$(this).hide();
if(txtfocus)$(".txt").focus();//txt获取焦点后弹出tip,点击tip后设置回焦点
});
});
http://bbs.csdn.net/topics/390830247
这是相同的问题,你回答一下我把分给你