和alert同意的功能 但更换它的图标
现在我是用showModalDialog 模拟alert自己popup一个htm文件
我对前台不熟悉 谁帮忙 写个规范点的alert的htm文件?
麻烦帮帮忙 急用!

解决方案 »

  1.   

    楼主强烈建议你不要用showModalDialog,因为太多的局限,建议你用一个div层来表示
      

  2.   

    顶楼上    模拟alert还是DIV弹出层是王道吧
      

  3.   

    test
    <html><script language="Javascript">
    <!--
    function btn_click() {
        window.showModalDialog("alert.html", document.all.text1.value,"dialogHeight:50px; dialogWidth:100px;");
    }
    -->
    </script><body>
    <input type="button" value="alert" onclick="btn_click()">
    <input type="text" name="text1" value="test">
    </body>
    </html> 
    alert.html
    <script type="text/javascript"> 
    window.onload=fnInit;
    function fnInit(){
    oArgs.innerHTML=window.dialogArguments;
    }
    </script><div style="position:absolute;width:100%;height:100%;background:#eee;">
    <div style="position:absolute;width:100%;height:10%;top=30%;text-align: center;" id="oArgs"></div>
    <div style="position:absolute;width:100%;height:10%;top=60%;text-align: center"><input type=button value=" ok " onclick="window.close();"></div>
    </div>