java 代码
- //弹出层
- var obj1,obj2,obj3,obj4
- function Myalert(url,top,left,width,height){
- obj1=document.createElement('<div id="a" style="position:absolute;filter:alpha(opacity=50);background-color:#cccccc;top:0px;left:0px;width:100%;height:100%;z-index:1000"></div>');
- str='<div align="center" id="b" style="filter:alpha(opacity=100);position:absolute;z-index:1001;top:'+top+'px;left:'+left+'px;width:'+width+'px;height:'+height+'px;background-color:#ffffff;"></div>';
- obj2=document.createElement(str);
- obj3=document.createElement("aaaaaaaaaaaaaaaa");
- //obj3.innerText="";
- //obj4=document.createElement('<input type="button" value="bbb" οnclick="MYalertOk()">');
- obj2.appendChild(obj3);
- //obj2.appendChild(obj4)
- document.body.appendChild(obj1);
- document.body.appendChild(obj2);
- }
- function MYalertOk(){
- document.body.removeChild(obj1);
- document.body.removeChild(obj2);
- }