我在dreamwaver中写了两个jsp文件,想用一个jsp文件中的一张图作为链接,弹出一个内置窗口,内置窗口的内容是另外一个jsp中的内容,求解答。

解决方案 »

  1.   


    <html>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    <body >  
        <a href="javascrtipt:void(0)" onClick="aa()"><img src="" alt=""></a>
        <div id="d" style="display:none;">
         <iframe src="b.jsp" width="182" height="372" scrolling="no" frameborder="0"  allowtransparency="ture"></iframe>
        </div>
    <script> 
    function aa(){
    document.getElementById('d').style.display = 'block';
    };
    </script> 
        
            
        </body>
    </html>   
      

  2.   

    用iframe即可,可以动态生成iframe
      

  3.   

            window.showModalDialog()                 方法用来创建一个显示HTML内容的模态对话框。
             window.showModelessDialog()            方法用来创建一个显示HTML内容的非模态对话框。
    使用方法:
             vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
             vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
    参数说明:
            sURL                --   必选参数,类型:字符串。用来指定对话框要显示的文档的URL。
            vArguments   --    可选参数,类型:变体。用来向对话框传递参数。传递的参数类型不限,包括数组等。对话框通过window.dialogArguments来取得传递进来的参数。
            sFeatures       --    可选参数,类型:字符串。用来描述对话框的外观等信息,可以使用以下的一个或几个,用分号“;”隔开。