<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">
解决方案 »
- 在静态页面,只用javascript 或者 jquery,如何能判断www.baidu.com这个网址是否是死链接
- 如何才能让没有程序基础的人学会JS
- 如何实现在表格里的一行中,部分文字靠左,同时部分文字靠右?
- 做个button,点击以后效果为刷新当前页面
- 请高手解答!
- 求鼠标滚轮(中键)按下代码,已知滚动代码:onMouseWheel
- 关于label!高分 ,求助
- 奇怪的问题,src='page.php?page='+location.href 不能用吗?有什么好的解决方法
- 下面的代码有什么问题,不懂的说?
- 用checkbox控制控件怎么不行???
- javascript能不能取到鼠标在浏览器中的位置!不是页面中的位置!
- 百万书库的广告窗口是怎么作的?
{
//存在
}
else
{
//不存在
}
//这里做你要做的事,如
document.all("div的id").style="";
}catch(e){alert("不在");}
//这里做你要做的事,如
document.all("div的id").style="";
}catch(e){alert("不在");}