有問(wèn)題可聯(lián)系我QQ:429810818

          posts - 4, comments - 6, trackbacks - 0, articles - 8
          /**
           * @author tension
           * @param optins
           * copyright @Tension
           */
          function showTPopbox(optins){ 
          var width = optins.width;//寬
          var height = optins.height;//寬
          var url = optins.url;
          var titleStr = optins.title; //標(biāo)題
          var bodyHeight = height - 30;
          var str='<iframe src="'+url+'" width="100%" frameborder="0" scrolling="auto" marginwidth=0 marginheight=0 style="height:'+bodyHeight+'px"></iframe>';
          var sWidth,sHeight;   
          sWidth=document.documentElement.clientWidth;   
          sHeight=document.documentElement.clientHeight;   
           
          /*半透明層  -----begin-------*/
          var bgObj=document.createElement("div");   
          bgObj.setAttribute('id','bgDiv');   
          bgObj.style.position="absolute";   
          bgObj.style.top="0";   
          bgObj.style.background="#cccccc";   
          bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=1,opacity=20,finishOpacity=75";   
          bgObj.style.opacity="0.2";   
          bgObj.style.left="0";   
          bgObj.style.width=sWidth + "px";   
          bgObj.style.height=sHeight + "px";   
          bgObj.style.zIndex = "10000";   
          document.body.appendChild(bgObj);  
            
          /*半透明層  -----end-------*/
           
          var TPopbox=document.createElement("div"); 
          TPopbox.setAttribute("id","TPopbox");   
          TPopbox.setAttribute('class','panel window'); 
          TPopbox.setAttribute("align","center"); 
          TPopbox.style.position = "absolute";   
          //TPopbox.style.left = "50%";   
          //
          //TPopbox.style.top = "20%";   
          TPopbox.style.left = (sWidth - width) / 2 + "px";   
          TPopbox.style.top = (sHeight - height) / 2 +"px";   
          TPopbox.style.width = width + "px";   
          TPopbox.style.height =height + "px";   
          TPopbox.style.textAlign = "center";   
          TPopbox.style.lineHeight ="25px";   
          TPopbox.style.zIndex = "10001";   
          document.getElementById("bgDiv").appendChild(TPopbox);
          /**div 頭部 -----begin----*/
          var header=document.createElement("div");   
          header.setAttribute("id","panel-header");   
          header.setAttribute("align","left");   
          header.setAttribute("class","panel-header panel-header-noborder window-header"); 
          header.style.cursor="move"; 
          document.getElementById("TPopbox").appendChild(header);
          /**div 頭部 -----end----*/
          /**頭部title -----begin------*/
          var title=document.createElement("div");
          title.setAttribute("id","panel-header-title");
          title.innerHTML=titleStr; 
          document.getElementById("panel-header").appendChild(title);
          /**頭部title -----end------*/
          /**工具 -----begin-------*/
          var tool=document.createElement("div");
          tool.setAttribute("id","panel-tool-close");
          tool.setAttribute("class","panel-tool");
          tool.innerHTML='<a class="panel-tool-close" href="javascript:void(0)"></a>'; 
          document.getElementById("panel-header").appendChild(tool);
          tool.onclick= function(){close();};
          /**工具 -----end-------*/
             
          document.body.appendChild(TPopbox);   
          document.getElementById("TPopbox").appendChild(header);   
          var body=document.createElement("div");   
          body.setAttribute("id","panel-body");
          body.setAttribute("class","dialog-content panel-body panel-body-noheader panel-body-noborder");
          body.style.height = height - 30 + "px";
          body.style.background="white";  
          body.style.fontSize="20";
          body.innerHTML=str;   
          document.getElementById("TPopbox").appendChild(body);   
          }   
          function close(){   
          document.body.removeChild(document.getElementById("TPopbox"));  
          document.body.removeChild(document.getElementById("bgDiv"));   
          };

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 鄂尔多斯市| 华蓥市| 高青县| 桦南县| 海口市| 木兰县| 沐川县| 云安县| 凭祥市| 冷水江市| 罗源县| 大理市| 邵东县| 诏安县| 阿瓦提县| 巧家县| 南平市| 大理市| 庆安县| 临武县| 故城县| 连州市| 绥滨县| 南宁市| 赫章县| 珲春市| 榆中县| 尉犁县| 石城县| 遂川县| 浏阳市| 三明市| 江山市| 太湖县| 建宁县| 读书| 墨竹工卡县| 鲁甸县| 四会市| 上虞市| 南开区|