<div id=mxh1>div1</div>
<input type="button" onclick="if(document.all.mxh1) alert('在');else {alert('不再')}" value="看div1">
<input type="button" onclick="if(document.all.mxh2) alert('在');else {alert('不再')}" value="看div2">
<input type="button" onclick="if(document.all.mxh1) alert('在');else {alert('不再')}" value="看div1">
<input type="button" onclick="if(document.all.mxh2) alert('在');else {alert('不再')}" value="看div2">
解决方案 »
- JS里如何像C或C++一样包含其他源文件
- JS小问题求助
- 求JS代码当页面在 load完后不用点击自动将页面上的简体转变为繁体字!!!急,请各位帮帮忙
- 关于弹出层
- 怎么实现javascript 中一个div层跟随鼠标移动
- 关于window.open的使用
- 动态设置style
- *****************做网站的朋友们能否帮忙推荐一个域名注册和空间租用?******************
- 怎么定位光标在text中的位置...???
- 请问各位高手,java applet调用javascript函数的一个问题
- javascript能不能取到鼠标在浏览器中的位置!不是页面中的位置!
- 百万书库的广告窗口是怎么作的?
{
//存在
}
else
{
//不存在
}
//这里做你要做的事,如
document.all("div的id").style="";
}catch(e){alert("不在");}
//这里做你要做的事,如
document.all("div的id").style="";
}catch(e){alert("不在");}