该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
例子.div1{
background-color:#000000;
position: absolute top:0;
left:0;z-index:1;
display:none;
filter:Alpha(opacity=30);
}
.div2{
width:400px;
height:250px;
position:absolute;
z-index:2;
display:
none;border:3px solid #59b3f8;
background-color:#ffffff;
}
function show(){
div1.style.display="inline";
div1.style.width=body.clientWidth;
div1.style.height=body.clientHeight;
div2.style.display="inline";
div2.style.top=body.clientHeight/2-div2.clientHeight/2;
div2.style.left=body.clientWidth/2-div2.clientWidth/2;
var xyz=document.getElementById('one');
var two=document.getElementById('two');
var three=document.getElementById('div2');
three.innerHTML="
你填写的内容如下:
"+"你的名字是:"+xyz.value+""+"你的家乡是:"+two.value+' ';
}
function closeShow(){
div1.style.display="none";
div2.style.display="none";
}
/* Ajax部分,需要后台支持
function butt(){
var aaa=document.getElementById('one');
var bbb=document.getElementById('two');
var ajax=Ajax();
ajax.post("text.php",{one:aaa.value},function(data){
Ajax返回内容});
}*/
测试实例
你的名字是:
你的家乡是: