一个强健 实用的asp+ajax二级联动菜单(有演示和附源程序打包下载

2019-04-02 06:33:34王冬梅

Str = Replace(Str, "drop", "drop", 1, -1, 1)
Str = Replace(Str, "create", "create", 1, -1, 1)
Str = Replace(Str, "rename", "rename", 1, -1, 1)
Str = Replace(Str, "count", "count", 1, -1, 1)
Str = Replace(Str, "chr", "chr", 1, -1, 1)
Str = Replace(Str, "mid", "mid", 1, -1, 1)
Str = Replace(Str, "truncate", "truncate", 1, -1, 1)
Str = Replace(Str, "nchar", "nchar", 1, -1, 1)
Str = Replace(Str, "char", "char", 1, -1, 1)
Str = Replace(Str, "alter", "alter", 1, -1, 1)
Str = Replace(Str, "cast", "cast", 1, -1, 1)
Str = Replace(Str, "exists", "exists", 1, -1, 1)
Str = Replace(Str,Chr(13),"<br>", 1, -1, 1)
safe = Replace(Str,"'","''", 1, -1, 1)
End Function
%>

最后一个js.js 

function createxmlhttp()
{
    xmlhttpobj = false;
    try{//创建对象,一个一个的试,哎,要是能统一标准都好。。
        xmlhttpobj = new XMLHttpRequest;
    }catch(e){
        try{
            xmlhttpobj=new ActiveXObject("MSXML2.XMLHTTP");
        }catch(e2){
            try{
                xmlhttpobj=new ActiveXObject("Microsoft.XMLHTTP");
            }catch(e3){
                xmlhttpobj = false;
            }
        }
    }
    return xmlhttpobj; 
}
function getsubcategory(bigclassid){
    if(bigclassid==0){
        document.getElementById("subclass").innerHTML="<select name='smallclassid'><option value='0' selected>选择二级分类</option></select>";
        return;
    };
    var xmlhttpobj = createxmlhttp();
    if(xmlhttpobj){//如果创建对象xmlhttpobj成功