javascript 怎么用if判断文本框是否获得焦点
if(Myform.document.getElementById("accountid").focus()){
document.all.accountidDiv.style.display = "none";
}
这样对嘛??
我是新手
谢谢
if(Myform.document.getElementById("accountid").focus()){
document.all.accountidDiv.style.display = "none";
}
这样对嘛??
我是新手
谢谢
解决方案 »
- 正则表达式的一点疑问???限定符?
- 听说CSDN高手如云,小弟我特来请教一个问题。
- 如何将表格保存为excel?谢谢各位大哥
- 用JS怎样把一个表格的style的background设为空(即没有)
- 如何获取<select><option...改变之前的value和index?谢谢!
- javascript question
- 如何在主窗口中打开一个隐含的窗口
- 跨框架的<iframe>刷新问题,在线给分!!!
- 高分求救,不够再加!!!哪位仁兄有用vbscript或者javascript操作Owc组件的例子!!!Chart 、Spreadsheet
- 请问谁能帮我写一个 简单的隐藏弹出 JS效果呢?
- 前段时间的csdn上面flash视频讲座跑哪去了。
- 还是JavaScript循环定时器的问题
var flag = false;
在Myform.document.getElementById("accountid")得到焦点时,把这个标记设置为true,失去焦点时为false
Myform.document.getElementById("accountid").onfocus=function(){flag = true;};
Myform.document.getElementById("accountid").onblur=function(){flag = false;};