我在aspx页面写了2个文本框。一个是A装开始时间,一个是B结束时间。现在我点击A出现时间。点B也出。也能选中上。现在我的需求是想写A,B的丢失焦点事件。就是我丢失焦点后A或者B人一个丢失,然后下面的时间框消失,http://www.xker.com/js/code/117227.html,这个是个示例网址,就是文本框出时间的。我的和他的文本框样式一样。就想丢失焦点后时间那框消失。求助。急。在线等
调试欢乐多
添加closeCalender2方法
<script type="text/javascript">
function closeCalender2() {
alert($("[style='position: absolute;']").html());
$("[style='position: absolute;']").remove();
}</script>
A、B text文本框 加入 onblur="closeCalender2()" 就可以了
alert($("[style='position: absolute;']").html());这段去掉
$("[style='position: absolute;']").remove();
}
没听明白你说的意思
setTimeout(function () { $("[style='position: absolute;']").remove() }, 200, 'may be is ok !');
var boxObj = d.nextSibling;
boxObj.targetObj.value = d.title;
boxObj.parentNode.removeChild(boxObj);
}然后给两个文本框加这个onblur="closeCalender2(this)