⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 服务器目录索引工具源代码
💻 ASP
字号:
<%
'set buffering to true
response.buffer = true%>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript"><!-- 
function getTopic()
{ 

// grab index number of the selected option
selInd = document.theForm.sites.selectedIndex; 

// get value of the selected option
goURL = document.theForm.sites.options[selInd].value;

// redirect browser to the grabbed value (hopefully a URL)
location.href="search.asp?topic="+goURL 

}
//--> 
</SCRIPT>
<style>
a{text-decoration:none}
a:hover{text-decoration:underline}
</style>
	<title>Untitled</title>
</head>
<body>
<%
 'xmlDom object
 Set objXML = Server.CreateObject("Microsoft.XMLDOM")
 objXML.async = False
 'load the xml menu file
 objXML.Load(Server.MapPath("data/mysites.xml"))
 Set objLst = objXML.getElementsByTagName("site")
 'how many items
 intNoOfHeadlines = objLst.length
 %>
 Pick a topic:
 <form name="theForm">
 <select name="sites" onchange="getTopic()">
 
 <%
 'building the select list by looping the nodes
 for i = 0 to intNoOfHeadlines-1
 	Set objHdl = objLst.item(i)
	selectItem = objHdl.childNodes(0).text
	'this is statment is to prevent from topic to appear twice
		if Instr(1, selectTemp, selectItem)=0 then
 			%>
 			<option value="<%=selectItem%>"><%=selectItem%></option>
 			<%
			selectTemp = selectTemp & selectItem
	end if
 Next
 %>
 
 </select>
 <br><br>
 <a href="index1.asp">See all Topics</a>
 </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -