<div class="index_personal_information_picname">
                    <a href="CutPhotoPage.aspx">Edit&nbsp;photograph</a>
                </div>
当我在另一个页面上点击CutPhotoPage.aspx.不是跳转到另一个页面,而是在这个页面之上弹出一个web窗体。怎么做?

解决方案 »

  1.   

    <a href="CutPhotoPage.aspx" _target=new>
      

  2.   

    模态窗口,
    弹出div窗口,div内可以引用CutPhotoPage.aspx内容。
      

  3.   

    div模拟窗口
    <div id="div1" >
        我要显示的区域
       </div><script> 
    var gDivLogDocument = null; 
    function UnLockDocument() 
      { 
        if(gDivLogDocument!=null) 
        { 
            gDivLogDocument.style.display = "none"; 
            document.body.removeChild(gDivLogDocument); 
            gDivLogDocument = null;  
            return; 
        } 
      } 
      
      function LockDocument(color,bNotAlpha) 
      { 
            if(gDivLogDocument!=null) 
            { 
                gDivLogDocument.style.display = ""; 
                return; 
            } 
            if(bNotAlpha ==null) 
            { 
                bNotAlpha  = false; 
            } 
            gDivLogDocument = document.createElement("DIV"); 
            gDivLogDocument.style.cssText = "position:absolute;zIndex:500;left:0px;top:0px;margin:0 0 0 0 ;background-color:gray;filter:alpha(opacity=60);-moz-opacity:0.6";  
            gDivLogDocument.oncontextmenu=function() 
          { 
            return false; 
          } 
                if(bNotAlpha) 
                {    
                  gDivLogDocument.style.filter = ""; 
              } 
              if(color !=null) 
                { 
                    gDivLogDocument.style.backgroundColor = color; 
                }  
            gDivLogDocument.style.width = document.body.clientWidth+"px"; 
          
            var height = Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight); 
            
            gDivLogDocument.style.height =height+"px" ; 
            
            document.body.appendChild(gDivLogDocument); 
      } 
      function OpenDivWindow(title,iWidth,iHeight,htmlElement) 
      { 
        var innerHTML = 
                " <table width='100%' border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> "+ 
                    " <tr> "+ 
                      " <td style=\"padding-left: 3px; color: white; filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#A9D1E0', endColorStr='#225289',gradientType='0')\"> "+ 
                            title+" </td>"+ 
                        " <td align='right' style=\"height: 24px; width: 16px' style='color: white; filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#A9D1E0', endColorStr='#225289',gradientType='0')\">"+ 
                            " <img alt='关闭' style='cursor: pointer' onclick='javascript:CloseDivWindowFromImg(this);' src='../images/close.gif'> </td> "+ 
                    " </tr> "+ 
                " </table> ";           
              var div = document.createElement("DIV"); 
              div.style.cssText="position: absolute; z-index: 502; background-color: White;width="+(iWidth)+"px;height:"+(iHeight+24)+"px;border:solid 1px gray"; 
              div.innerHTML = innerHTML;          
              
              if(document.forms.length>0) 
              { 
                    document.forms[0].appendChild(div); 
              }else 
              { 
                    document.body.appendChild(div); 
              } 
              div.appendChild(htmlElement); 
              htmlElement.style.display = ""; 
              CenterObject(div); 
              return div; 
        
      } 
        function CenterObject(obj) 
      { 
            var l = (document.body.offsetWidth - obj.offsetWidth)/2; 
            
            var t = (document.documentElement.clientHeight-obj.offsetHeight)/2; 
            obj.style.left = l+"px"; 
            obj.style.top = t +"px"; 
      } 
      
          function CloseDivWindow(div) 
      { 
            var innerElement = div.childNodes[1]; 
            if(innerElement)//remove the child element to body 
            { 
                innerElement.style.display = "none"; 
                if(document.forms.length>0) 
              { 
                    document.forms[0].appendChild(innerElement); 
              } 
              else 
              { 
                    document.body.appendChild(innerElement); 
              } 
            } 
            
                if(document.forms.length>0) 
              { 
                    document.forms[0].removeChild(div); 
              } 
              else 
              { 
                document.body.removeChild(div); 
              } 
            
            UnLockDocument(); 
      } 
      
      function CloseDivWindowFromImg(img) 
      { 
            var div  = img.parentNode.parentNode.parentNode.parentNode.parentNode; 
            CloseDivWindow(div); 
      } 
    LockDocument(); 
    OpenDivWindow("标题",400,300,document.getElementById("div1")); 
    </script>
      

  4.   

    <a href="javascript:window.showModelDialog( 'CutPhotoPage.aspx',me, "dialogHeigh:200;dialogWidth:200 "); ">具体如何使用http://hi.baidu.com/woaini5730/blog/item/02cb6a2256f0adf9d6cae2c7.html
      

  5.   

    <a href="javascript:window.showModalDialog('JiFenDuiYing.htm','window','dialogWidth:660px;dialogHeight:370px;center:yes;help:yes;resizable:yes;');" style="text-decoration:underline"><span style="color:Red">积分等级对应</span></a>
      

  6.   

    window.showModalDialog("CutPhotoPage.aspx",window,"dialogWidth:265px;dialogHeight:285px;")