<INPUT TYPE="button" value="创建模态对话框" onclick="fnOpenModal()"> 
<br><br> 
<INPUT TYPE="button" value="创建非模态对话框" onclick="fnOpenModeless()"> 
<script language="javascript"> 
function fnOpenModal(){ 
window.showModalDialog("cuit.htm") 

function fnOpenModeless(){ 
window.showModelessDialog("cuit.htm") 

</script> 

解决方案 »

  1.   

    那是meizz老大的jsframework...
    你自己去问他要...
      

  2.   

    页面中放一个iframe,设置它的width及height为100%,一个添加对话框的div层,div层的z-index大于iframe的z-index
    点击添加时,显示div层,及iframe,关闭时隐藏
      

  3.   

    (续...)
    window.Using = function(namespace,path,rename){
      var N=namespace,C=N.substr(N.lastIndexOf(".")+1),S=System,i=S._prototypes;
      if(S._exist(N,path)){if(window[C]!=i[N])window[C]=i[N];return}
      if(!/((^|\.)[\w_\$]+)+$/.test(N))throw new Error(N+" nonstandard namespace")
      for(var s,e,c=N+".",i=c.indexOf(".");i>-1;i=c.indexOf(".",i+1)){
      e=c.substring(0,i);s=(e.indexOf(".")==-1)?"window['"+e+"']":e;
      if(e&&typeof(eval(s))=="undefined")
      eval(s+"=function(){return System._getPrototype('"+e+"',arguments)}");}
      if(typeof(S._codebase[N])!="string"&&(s=S.load(N,path))) S._codebase[N]=
        s+";\r\nSystem._prototypes['"+N+"']=window['"+(rename||C)+"']="+C;s="";
      S._existences[N]=S._mapPath(N, path);
      if("string"==typeof (s=System._codebase[N]))try{(new Function(s))()}
      catch(e){System.alert("Syntax error on load "+ N +"\n"+ e.message);}
      //alert(System._codebase[namespace])
    };
    window.Import=function(namespace,path,rename){Using(namespace,path,rename)};
    window.Instance=function(hashCode){return System._instances[hashCode]};
    window.Include=function(namespace, path){
      var N=namespace,c,S=System,X=S.supportsXmlHttp();if(S._exist(N,path))return;
      if(!/((^|\.)[\w_\$]+)+$/.test(N))throw new Error(N+" nonstandard namespace")
      if(typeof(S._codebase[N])!="string")if(X&&(c=S.load(N,path)))
      S._codebase[N]=c;S._existences[N]=S._mapPath(N,path);
      var B=(typeof(S._codebase[N])=="string");try{
      if(window.execScript&&B)window.execScript(S._codebase[N]);else  {
        var s=document.createElement("SCRIPT");s.type="text/javascript";
        if(B)s.innerHTML="eval(System._codebase['"+N+"']);";
        else s.src=S._existences[N]=S._mapPath(N,path);
        document.getElementsByTagName("HEAD")[0].appendChild(s);s=null}
      }catch(B){S.alert("Syntax error on include "+N+"\n"+ B.message);}
    };
    Function.prototype.Extends=function(SuperClass,ClassName){
      var op=this.prototype, i, p=this.prototype=new SuperClass();
      if(ClassName)p._className=ClassName; for(i in op)p[i]=op[i];
      if(p.hashCode)delete System._instances[p.hashCode];return p;
    };
    S._prototypes={"System":S,"System.Object":S,"System.Event":System.Event};
    S._existences={"System.Event":S._mapPath("System.Event"),
      "System":S._mapPath("System"),"System.Object":S._mapPath("System.Object")};
    var t=System.Extends(Object, "System"); S.Object=S; S._instances={};
    t.addEventListener=function(type, handle){
      if(typeof(handle)!="function")
        throw new Error(this+" addEventListener: "+handle+" is not a function");
      if(!this._listeners) this._listeners={};
      var id=System.toHashCode(handle), t=this._listeners; 
      if(typeof(t[type])!="object") t[type]={}; t[type][id]=handle;
    };
    t.removeEventListener=function(type, handle){
      if(!this._listeners)this._listeners={};var t=this._listeners;
      if(!t[type]) return; var id=System.toHashCode(handle);
      if( t[type][id])delete t[type][id];if(t[type])delete t[type];
    };
    t.dispatchEvent=function(evt){
      if(!this._listeners)this._listeners={};
      var i, t =this._listeners, p =evt.type;
      evt.target=evt.srcElement=evt.target||evt.srcElement||this;
      evt.currentTarget=this;if(this[p])this[p](evt);
      if(typeof(t[p])=="object") for(i in t[p]) t[p][i].call(null, evt);
      delete evt.target;delete evt.currentTarget;delete evt.srcElement;
      return evt.returnValue;
    };
    t.dispose=function(){
      if(this.hashCode) delete System._instances[this.hashCode];
      for(var i in this)if(typeof(this[i])!="function")delete this[i];
    };
    t.setHashCode=function(){
      System._instances[(this.hashCode=System.getUniqueId())]=this;
    };
    t.getHashCode=function(){
      if(!this.hashCode)this.setHashCode();return this.hashCode;
    };
    t.decontrol=function(){delete System._instances[this.hashCode];}
    t.toString=function(){return "[object "+(this._className||"Object")+"]"};
    S.getType=function(e){
      if(typeof(e)!="object")return typeof(e);
      if(e=="[object Object]")return "object";
      if(/\[object\s+([^\s\]]+)\]/.test(e))return RegExp.$1;
      else return "object";
    };
    System.Event=function(type){this.type=type;};
    t=System.Event.Extends(System,"System.Event");
    t.returnValue=true;t.cancelBubble=false;
    t.target=t.currentTarget=t.srcElement=null;
    if(System.ie){S.scriptElement.addBehavior("#default#userdata");
    S.saveUserData=function(key, value){
      try{var d=new Date();d.setDate(d.getDate()+3);//3 day
      var t=System.scriptElement;t.load(key.replace(/\W/g,"_"));
      t.setAttribute("code",value);
      t.setAttribute("version",System.currentVersion);
      t.expires=d.toUTCString(); t.save(key.replace(/\W/g,"_"));
      return t.getAttribute("code");}catch(ex){}
    }
    S.loadUserData=function(key){
      try{var t=System.scriptElement;t.load(key.replace(/\W/g,"_"));
      if(System.currentVersion!=t.getAttribute("version")){
      if(t.getAttribute("code"))System.deleteUserData(key);
      return "";}return t.getAttribute("code");}catch(ex){return ""}
    }
    S.deleteUserData=function(key){
      try{var t=System.scriptElement;t.load(key.replace(/\W/g,"_"));
      t.expires=new Date(315532799000).toUTCString();
      t.save(key.replace(/\W/g, "_"));}catch(ex){}}
    } S=t=null;
    try{
      if(window.opera) Include("System.Plugins.Opera");
      Include("System.Global");
    }catch(ex){}}
      

  4.   

    lss的太有聊了吧...
    直接把jsframework引入,再import两个namespace不就完了...
    贴那么多出来干什么...
      

  5.   

    不是meizz的是xp的
    <script language="javascript"> 
    function AddNew() 

    __doPostBack('AddNew',''); 

     function ShowTip(n){
     if( n ==0){
    TipSpan.innerHTML="新增资料:";
    TipDiv.style.left =30;
    TipDiv.style.top = 150;
    TipDiv.style.display='';
    document.all.Tno.disabled=false;
    document.all.Ops.value="insert";
    SetTextBox();
     }
     else if (n ==1){
    // close
    TipDiv.style.display='none';
     }
     else if(n == 2)
    {
    TipSpan.innerHTML="资料:";
    TipDiv.style.left =30;
    TipDiv.style.top = 150;
    TipDiv.style.display='';
    //document.all.Ops.value="insert";
    document.all.Tno.disabled=true;
    //document.all.Tnm.disabled=true;
    document.all["Tamt"].focus();
    }
     else{
    var eventElement = document.all[n];
    var bodyHeight = document.body.clientHeight;
    var eventHeight = eventElement.getBoundingClientRect().top+document.body.scrollTop;
    if (eventHeight+10 > bodyHeight) eventHeight -= 100;
    TipDiv.style.left=30
    TipDiv.style.top= eventHeight +10 ;
    TipDiv.style.display='';
    document.all.Tno.disabled=true;
    //document.all.Tnm.disabled=true;
    }
    }
    function SetTextBox() {
    document.all.Tno.value="";
    document.all.Tnm.value="";
    document.all.Tamt.value="";
    document.all.Tdate_Text1.value="";
    document.all.DFEE_ITEM.selectedIndex = 0;
    document.all.Tno.focus();
    }
    function AllowInsert(){
    if (!document.all.Binsert){
    document.all.Binsert2.style.display='';
    }
    }
    </script>
    <div align="center">专业津贴资料</div>
    <TABLE cellSpacing="0" cellPadding="0" width="80%" align="center" border="0">
    <TBODY>
    <TR>
    <TD width="12"><IMG height="8" src="../../Gridimg/left_01.gif" width="11"></TD>
    <TD width="6"><IMG height="8" src="../../Gridimg/left_02-1.gif" width="6"></TD>
    <TD width="*" background="../../Gridimg/left_02-2.gif"></TD>
    <TD width="6"><IMG height="8" src="../../Gridimg/left_02-3.gif" width="6"></TD>
    <TD width="18"><IMG height="8" src="../../Gridimg/left_03.gif" width="16"></TD>
    </TR>
    <TR>
    <TD vAlign="top" width="12" background="../../Gridimg/left_07.gif"><IMG src="../../Gridimg/left_04.gif" width="11"></TD>
    <TD vAlign="top" colSpan="3" rowSpan="3">
    <!-- DataGrid Start--><!-- DataGrid End --></TD>
    <TD vAlign="top" width="18" background="../../Gridimg/left_09.gif"><IMG src="../../Gridimg/left_06.gif" width="16"></TD>
    </TR>
    <TR>
    <TD width="12" background="../../Gridimg/left_07.gif"></TD>
    <TD width="18" background="../../Gridimg/left_09.gif"></TD>
    </TR>
    <TR>
    <TD vAlign="bottom" width="12" background="../../Gridimg/left_07.gif"><IMG src="../../Gridimg/left_10.gif" width="11"></TD>
    <TD vAlign="bottom" width="18" background="../../Gridimg/left_09.gif"><IMG src="../../Gridimg/left_12.gif" width="16"></TD>
    </TR>
    <TR>
    <TD width="12"><IMG height="10" src="../../Gridimg/left_13.gif" width="11"></TD>
    <TD width="6"><IMG height="10" src="../../Gridimg/left_14-1.gif" width="6"></TD>
    <TD width="100%" background="../../Gridimg/left_14-2.gif"></TD>
    <TD width="6"><IMG height="10" src="../../Gridimg/left_14-3.gif" width="6"></TD>
    <TD width="18"><IMG height="10" src="../../Gridimg/left_15.gif" width="16"></TD>
    </TR>
    </TBODY>
    </TABLE>
    <table width="80%" align="center" border="0">
    <tr>
    <td align="left" width="100%" colSpan="2"></td>
    </tr>
    </table>
    <BR>
    <!-- Div Start-->
    <DIV id="TipDiv" style="DISPLAY: none; POSITION: absolute; TOP: 150px">
    <table cellSpacing="0" cellPadding="0" width="80%" border="0">
    <tr onmouseup="cleardrag()" onmousedown="drags(TipDiv)">
    <td width="2"><IMG src="../../XPimages/N_title1.gif"></td>
    <td background="../../XPimages/n_title.gif">
    <table cellSpacing="0" cellPadding="0" width="100%" border="0">
    <tr>
    <td align="left"><IMG src="../../XPimages/system_icon.gif"><b><font color="#ffffff"><span id="TipSpan">修改资料:</span></font></b></td>
    <td align="right"><A onmouseover="document['CloseImage'].src = '../../XPimages/close_over.gif';" onmouseout="document['CloseImage'].src = '../../XPimages/close.gif';"
    href="javascript:ShowTip(1);"><IMG src="../../XPimages/close.gif" align="right" border="0" name="CloseImage">
    </A>
    </td>
    </tr>
    </table>
    </td>
    <td width="2"><IMG src="../../XPimages/N_title2.gif"></td>
    </tr>
    <tr>
    <td width="2" background="../../XPimages/N_center1.gif"></td>
    <td>
    <table cellSpacing="0" cellPadding="0" width="100%" border="1" bordercolordark="#ffffff"
    bordercolorlight="#000000">
    <TBODY>
    <tr class="GrayBG" align="center">
    <td>专业等级</td>
    <td>专业等级名称</td>
    <td>津贴金额</td>
    <td>生效日期</td>
    <td>计费项目</td>
    </tr>
    <tr bgColor="#efefef" align="center">
    <td><input name="Tno" type="text" id="Tno" style="width:64px;" /></td>
    <td><input name="Tnm" type="text" id="Tnm" style="width:80px;" /></td>
    <td><input name="Tamt" type="text" id="Tamt" style="width:80px;" /></td>
    <td>
    <input name="Tdate:Text1" type="text" maxlength="10" readonly="readonly" id="Tdate_Text1" style="border-style:Groove;width:88px;" />
    <input name="Tdate:Button1" id="Tdate_Button1" type="button" value=">" onclick="calendar(eval('this.form.Tdate_Text1'))" /> </td>
    <td><select name="DFEE_ITEM" id="DFEE_ITEM" class="input1">
    <option selected="selected" value="">---请选择---</option>
    <option value="301">基本工资</option>
    <option value="302">职务工资</option>
    <option value="303">绩效工资</option>
    <option value="304">专业津贴</option>
    <option value="305">普加工资</option>
    <option value="306">例日工资</option>
    <option value="307">国假工资</option>
    <option value="308">奖励</option>
    <option value="309">押金</option>
    <option value="310">税金</option>
    <option value="311">社保</option>
    <option value="312">区域补贴</option>
      

  6.   

    上面是html代码下面是dorgMove.js
    // title mouse 拖拉 DIV 等浮动无素
    // 使用方法:onMouseDown="drags(this)" onMouseup="dragstrue=false;"
    //<DIV id="TipDiv" style="PADDING-RIGHT: 5px; DISPLAY: ''; PADDING-LEFT: 5px; LEFT: 0px; VISIBILITY: visible; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; POSITION: absolute; TOP: 50px" >
    //-->/*变量*/
    var dragtrue=false;
    var z,x,y;
    /*当mousedown时,调用此method*/
    function drags(obj){
    if (!document.all){alert("Not a Object!");}
    if ( window.event.srcElement.tagName =="INPUT"){
    obj.cursor="auto";//移动样式
    document.onmousemove="";//当鼠标移动时,调用move()方法
    }else{

    dragtrue=true;//拖动允许
    z=obj;//将对象赋给z;
    temp1=z.style.pixelLeft;//用css的pixel属性将对象的当前相对位置赋给temp1
    temp2=z.style.pixelTop ;//
    x=event.clientX;//鼠标的位置
    y=event.clientY;
    z.style.cursor="move";//移动样式
    document.onmousemove=move;//当鼠标移动时,调用move()方法
    }
    }
    function move(){
    if (event.button==1&&dragtrue){//如果鼠标左键按下,而且拖动允许
    z.style.pixelLeft=temp1+event.clientX-x;//将temp1的值+鼠标当前值-鼠标还有值
    z.style.pixelTop=temp2+event.clientY-y;
    return false;
    }
    }function cleardrag(){
    dragstrue=false;
    z.style.cursor ="auto";
    document.onmousemove="";//当鼠标移动时,调用move()方法
    }
      

  7.   

    主  题:  200求CSDN的系统消息弹出窗口代码--------------------------------------------------------------ms lz是要代码的~
      

  8.   

    光引用 meizz 的jsFramework 
    再 include 不是楼主想要的啊
      

  9.   

    还是期待 meizz 能够公开 Csdn.IM.NoticeWindow 的js源码吧。
      

  10.   

    meizz是谁啊?
    这个jsframework是做什么的啊?
      

  11.   

    meizz是梅花雪老大,原来这个论坛很有名的一个人物~最有名的作品是Web TreeView(MzTreeView),就是有名的“树形菜单控件”~
    这个CSDN论坛的左侧菜单就是在MzTreeView10.js的基础上实现的~梅老大的主页是http://www.meizz.com,有兴趣的朋友可以去看看~
    在那能学到很多东西~
      

  12.   

    来这个版混不知道meizz是谁...
    啊哈...无法无天了...
      

  13.   

    那谁和meizz熟?去问下他这个弹出对话框的问题啊~~~
      

  14.   

    对啦
    他在csdn有博客没啊??