本帖最后由 gzhalt 于 2009-11-06 19:30:53 编辑

解决方案 »

  1.   


    是的。
    还有个问题,在asp文件居然调javascript自定义涵数没反应。
      

  2.   


    调用方法
    <script type="text/javascript" src="../inc/Dialog.js"></script>
    <script type="text/javascript">
    function $(ele) {
     if (typeof(ele) == 'string'){
     ele = document.getElementById(ele)
     if(!ele){
     return null;
     }
     }
     if(ele){
     Core.attachMethod(ele);
    }
     return ele;
    }
    var Core = {};
    Core.attachMethod = function(ele){
    if(!ele||ele["$A"]){
    return;
    }
    if(ele.nodeType==9){
    return;
    }
    var win;
    try{
    if(isGecko){
    win = ele.ownerDocument.defaultView;
    }else{
    win = ele.ownerDocument.parentWindow;
    }
    for(var prop in $E){
    ele[prop] = win.$E[prop];
    }
    }catch(ex){
    //alert("Core.attachMethod:"+ele)//有些对象不能附加属性,如flash
    }
    }
    function zOpen(idd){
    var diag = new Dialog("Diag2");
    diag.Width = 450;
    diag.Height = 400;
    diag.Title = "";
    diag.URL = "../sales/buyadd.asp?id="+idd;
    //diag.OKEvent = zAlert;//点击确定后调用的方法diag.show();
    }
    </script>