显示b层:document.getElementById("b").style.display=""隐藏b层:document.getElementById("b").style.display="none"
解决方案 »
- ExtJs radio问题,不知道大家有没有碰到过?
- 页面跳转的问题...
- 大侠过来看看小弟的问题
- 如何对应:随机连续播放图片,在点某张图的时候出现隐藏层,层中显示对应的大图象。如何对应
- 关于 radio的问题
- 如何让内嵌的mediaplayer响应键盘鼠标事件?
- 请问 <TD HEIGHT=20>怎么用css表示
- 急!不懂技术 问个技术问题
- 我刚学jb8,按照参考书上写'hello world'的开始编程,怎么出错!!!大家帮我!!!
- 能进来看的就都来看看!一个始终没能解决的问题,曾经提过,各位大虾帮忙献技!!!!(无奈,刚才的那个只能结了)
- javascript动态增加表格行,在行的text框中用jquery选择输入项无效
- js的小问题,有10行的原码,迷惑!
function closePopWindow(){
document.all.tipPanle.style.display="none";
}function initPopWindow(){
var p="<div id=\"tipPanle\" style=\"display:none\">"+
"<div id=\"ly\" style=\"position: absolute; top: 0px; background:gray;filter: alpha(opacity=30)"+
" z-index: 1; left: 0px;\">"+
"</div>"+
"<div id=\"mytip\">"+
" <table width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"5\">"+
" <tr class=\"tipTitle\">"+
" <td><img src='info.gif'><span id=\"SysMsgTitle\"></span></td>"+
" </tr>"+
" <tr class=\"tipBody\">"+
" <td><b><img src='info.gif'> <span id=\"SysMsgContent\"><b></span>"+
" </tr>"+
" <tr class=\"tipBottom\">"+
" <td><input type=\"button\" value=\"确 定\" onclick=\"closePopWindow();\"></td>"+
" </tr>"+
" </table>"+
"</div>"+
"</div>"
if(document.all.tipPanle) return;
document.body.innerHTML+=p;
}function popMsg(title,content){
initPopWindow();
document.getElementById("SysMsgTitle").innerHTML=title;
document.getElementById("SysMsgContent").innerHTML=content;
document.all.tipPanle.style.display="block";
document.all.ly.style.width=document.body.clientWidth;
document.all.ly.style.height=document.body.clientHeight;
}function dosubmit(){
if(document.all.name.value==""){
popMsg("系统提示","错误:用户名称不能为空,请填写!"); }
}
</script>
<style type="text/css">
.tipTitle{background:#ff0000;color:white;font-weight:bold;height:21px;font-size:10pt;}/*消息框标题*/
.tipBody{background:white;color:gray;font-size:9pt;text-align:center;}
.tipBottom{background:#f4f4f5;text-align:right;padding-right:1em;height:22}
#mytip {
position: absolute;
width:400px;
height:150px;
left:50%;
top:50%;
margin-left:-200px;
margin-top:-75px;
border: gray 1px solid ;
}
</style><body>
<table border="">
<tr>
<td>UserName:<input type="text" name="name">
</td>
</tr>
</table>
<input type="button" onclick="dosubmit();" value="submit"></body>
</html>