一个html如何调用另外一个html文件.?     谢谢!

解决方案 »

  1.   

    window.showModalDialog(调用的页面,"","dialogWidth=300px;dialogHeight=150px;status=no;help=no;scrollbars=no"
      

  2.   

    如果是要调用一个html文件,并得到其执行后的代码的话可以用以下脚本:
    Sub getOtherpage()
       url ="2.htm"  ' 可以为任何其他网站的URL'
       
    set http=createobject("Microsoft.XMLHTTP")  
    http.open "POST",url,false  '调用2.htm,提交方式为post'
    http.setrequestheader "Content-Type","application/x-www-form-urlencoded"   http.send "username=test" '提交一个username信息给2.htm,其值为test'
    resbody = bytes2BSTR(http.responseBody) ' 获得2.htm的执行结果',反返回代码  document.all.div1.innerHTML=resbody
    end sub
      

  3.   

    是用VBScript写的,也可以用JavaScript来实现XMLHttp技术
      

  4.   

    其实就是一个html网页     当加载的时候调用另外一个 html文件
      

  5.   

    如果你是要用几个小页面来拼你的大页面的这种调用的话,可以用frame来实现.简单,传统,不容易出错
      

  6.   

    !--1.htm-->
    <html><head><title>页面1</title></head>
    <body>
    <script language="vbscript">
    function bytes2bstr(vin)
        strreturn = ""
        for i = 1 to lenb(vin)
            thischarcode = ascb(midb(vin,i,1))
            if thischarcode < &h80 then
                strreturn = strreturn & chr(thischarcode)
            else
                nextcharcode = ascb(midb(vin,i+1,1))
                strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))
                i = i + 1
            end if
        next
        bytes2bstr = strreturn
    end function
    sub callpage()
     dim xmlhttp,html
     set xmlhttp = createobject("microsoft.xmlhttp")
     xmlhttp.open "get", "2.htm", false 
     xmlhttp.setrequestheader "content-type","text/xml" 
     xmlhttp.send
     
     html = bytes2bstr(xmlhttp.responsebody)
     document.write html
    end sub
    call callpage()</script>
    </body></html>
      

  7.   

    <!--2.htm ,任意,最好不要包括<html><head>..</head></body>之类的标记
    把这两个文件的代码Copy试一试
    -->
    <table><tr>
    <td><select size="1" name="Customerid" >
    <option selected>Please choose one book of yours</option>
    <option value="v1" label="l1">text1</option>
    <option value="v2" label="l2">text2</option>
    <option value="v3" label="l3">text3</option>
    </select><td>
    <td id="show">显示处</td>
    </tr></table>