asp.net(vb) 如何实现这种功能~!??高手支援!!

解决方案 »

  1.   

    在一个组建上双击,弹出一个新窗体,这个窗体类似于web应用程序。如何实现。高手看看~!!
      

  2.   

    <script>
    function sAlert(){
        var eSrc=(document.all)?window.event.srcElement:arguments[1];
        var shield = document.createElement("DIV");
        shield.id = "shield";
        shield.style.position = "absolute";
        shield.style.left = "0px";
        shield.style.top = "0px";
        shield.style.width = "100%";
        shield.style.height = ((document.documentElement.clientHeight>document.documentElement.scrollHeight)?document.documentElement.clientHeight:document.documentElement.scrollHeight)+"px";
        shield.style.background = "#333";
        shield.style.textAlign = "center";
        shield.style.zIndex = "10000";
        shield.style.filter = "alpha(opacity=0)";
        shield.style.opacity = 0;
        
        var alertFram = document.createElement("DIV");
        alertFram.id="alertFram";
        alertFram.style.position = "absolute";
        alertFram.style.left = "50%";
        alertFram.style.top = "50%";
        alertFram.style.marginLeft = "-180px" ;
        alertFram.style.marginTop = "-140px";
        alertFram.style.width = "360px";
        alertFram.style.height = "280px";
        alertFram.style.background = "#E8F0F8";
        alertFram.style.zIndex = "10001";
        
        strHtml  = "<h2><span class=\"close\"><a href=\"javascript:void(null);\" onclick=\"doOk();\">X</a></span><span>Send a post</span></h2>\n";
        strHtml += "<form id=\"postform\" name=\"postform\" action=\"javascript:void(null);\" onSubmit=\"post();doOk();\" method=\"post\" enctype=\"multipart/form-data\">\n";
        strHtml += "  <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"dd\">\n";
        strHtml += "   <tr><td width=\"70\">Nick Name:</td><td width=\"300\" height=\"22\" align=\"left\"><input name=\"Nick\" type=\"text\" id=\"Nick\" size=\"30\" /> </td></tr>\n";
        strHtml += "   <tr><td width=\"70\">Email:</td><td width=\"300\" height=\"22\" align=\"left\"><input name=\"Email\" type=\"text\" id=\"Email\" size=\"30\" /> </td></tr>\n";
        strHtml += "   <tr><td width=\"70\">HomePage:</td><td width=\"300\" height=\"22\" align=\"left\"><input name=\"HomePage\" type=\"text\" id=\"HomePage\" size=\"30\" /> </td></tr>\n";
        strHtml += "   <tr><td width=\"70\">Message:</td><td width=\"300\" height=\"22\" align=\"left\"><textarea name=\"Message\" id=\"Message\" cols=\"40\" rows=\"5\"></textarea> </td></tr>\n";
        strHtml += "<tr><td height=\"25\" colspan=\"2\" align=\"center\"><input type=\"submit\" class=\"btn1\" name=\"Send\" id=\"Send\" value=\"Send\" />&nbsp;      <input type=\"reset\" name=\"Reset\" class=\"btn1\" id=\"Reset\" value=\"Reset\" /></td></tr>\n";
        strHtml += "</table></form>\n";
        alertFram.innerHTML = strHtml;
        document.body.appendChild(alertFram);
        document.body.appendChild(shield);
        this.setOpacity = function(obj,opacity){
            if(opacity>=1)opacity=opacity/100;
            try{ obj.style.opacity=opacity; }catch(e){}
            try{ 
                if(obj.filters.length>0&&obj.filters("alpha")){
                    obj.filters("alpha").opacity=opacity*100;
                }else{
                    obj.style.filter="alpha(opacity=\""+(opacity*100)+"\")";
                }
            }catch(e){}
        }
        
        var c = 0;
        this.doAlpha = function(){
            if (++c > 20){clearInterval(ad);return 0;}
            setOpacity(shield,c);
        }
        var ad = setInterval("doAlpha()",1);
        
        this.doOk = function(){
            //alertFram.style.display = "none";
            //shield.style.display = "none";
            document.body.removeChild(alertFram);
            document.body.removeChild(shield);
            eSrc.focus();
            document.body.onselectstart = function(){return true;}
            document.body.oncontextmenu = function(){return true;}
        }
        document.getElementById("Send").focus();
        eSrc.blur();
        document.body.onselectstart = function(){return false;}
        document.body.oncontextmenu = function(){return false;}
    }
    </script>
    <a href="#" onclick="sAlert()">点我</a>
      

  3.   

    用一个JS的UI组件吧,很好用,ymPrompt
      

  4.   

     zhulei2008 
    滴水浪流OK,很彻底~!很OK!!