2015-03-19 66 views
0

我有這個HTML頁面,我需要在IIS 7服務器上實現,但沒有服務器來測試。VB腳本測試無法訪問Windows服務器

任何人都可以幫助我,這是否會在IIS服務器上工作,或者如果我需要打開運行經典ASP文件的設置。

VB腳本:

<script language="vbscript"> 

sub hideall 
    dim i 
    for i=0 to document.all.length-1 
     if instr(1,document.all(i).id,"pop")=1 then 
      document.all(i).style.visibility="hidden" 
     end if 
    next  
end sub 
sub L1_onclick() 
     hideall 
     intros.style.visibility = "visible" 
     L1.style.color = "purple"   
end sub 
sub L2_onclick()  
     hideall 
     pop2.style.visibility = "visible" 
     intros.style.visibility = "hidden" 
     L2.style.color = "purple"  

end sub 
sub L3_onclick() 
     hideall 
     pop3.style.visibility = "visible" 
     intros.style.visibility = "hidden" 
     L3.style.color = "purple" 

end sub 
sub init() 
    hideall() 
end sub 
</script> 

菜單結構如下:

!--MENU1--> 
<div style="LEFT: -20px; POSITION: absolute; TOP: 270px; WIDTH: 190px"> 
    <ul class="list2"> 
     <li style="CURSOR: hand" id="L1"> 
     Introduction 
     </li> 
    </ul> 
</div> 
<!--MENU2--> 
<div style="LEFT: -20px; POSITION: absolute; TOP: 300px; WIDTH: 190px"> 
    <ul class="list1"> 
     <li style="CURSOR: hand" id="L2"> 
     Test 2 
     </li> 
    </ul> 
</div> 
<!--MENU3--> 
<div style="LEFT: -20px; POSITION: absolute; TOP: 330px; WIDTH: 190px"> 
    <ul class="list1"> 
     <li style="CURSOR: hand" id="L3"> 
     Test 3 </li> 
    </ul> 
</div> 

內容結構如下:

<div id="intros" style="position: absolute; left: 170; top: 150; visibility: visible"> 
<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" 
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0" 
ID=introduction width=600 height=490> 
<param name=src value="dswmedia/introduction.dcr"> 
<param name=swRemote value="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' "> 
<param name=swStretchStyle value=none> 
<PARAM NAME=bgColor VALUE=#FFFFFF> 
<embed src="introduction.dcr" bgColor=#FFFFFF width=600 height=490 swRemote="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' " swStretchStyle=none 
type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed> 
</object> 
</div> 


<div id="pop2" style="position: absolute; left: 170; top: 150; visibility: hidden"> 
<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" 
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0" 
ID=torque reaction width=600 height=490> 
<param name=src value="dswmedia/test2.dcr"> 
<param name=swRemote value="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' "> 
<param name=swStretchStyle value=none> 
<PARAM NAME=bgColor VALUE=#FFFFFF> 
<embed src="test2.dcr" bgColor=#FFFFFF width=600 height=490 swRemote="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' " swStretchStyle=none 
type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed> 
</object> 
</div> 


<div id="pop3" style="position: absolute; left: 170; top: 150; visibility: hidden"> 
<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" 
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0" 
ID=tail rotor compensation width=600 height=490> 
<param name=src value="dswmedia/test3.dcr"> 
<param name=swRemote value="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' "> 
<param name=swStretchStyle value=none> 
<PARAM NAME=bgColor VALUE=#FFFFFF> 
<embed src="test3.dcr" bgColor=#FFFFFF width=600 height=490 swRemote="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' " swStretchStyle=none 
type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed> 
</object> 
</div> 

的腳本的目的是切換的內容顯示不同物體的主格

+0

爲什麼不把它放在自己的位置? – RatDon 2015-03-19 10:59:49

+0

我無法訪問服務器進行測試 – 2015-03-19 11:24:51

+0

您可以輕鬆打開Windows中的IIS服務器功能以進行測試。對? – RatDon 2015-03-19 11:33:37

回答

1

這不是傳統的ASP。 <script language="vbscript">表示您正在使用客戶端VBScript - 它將由您的瀏覽器而不是您的服務器呈現。它只能在Internet Explorer中工作,其他瀏覽器不支持它。

經典ASP是一種技術,它使您能夠在服務器上使用腳本語言(通常是VBScript,但有時使用Javascript)。如果您正在使用它,您確實需要打開ASP支持,因爲它在IIS7及更高版本上被默認禁用。如果您沒有運行IIS附帶的Windows版本,那麼您可以下載IISExpress作爲開發服務器使用。