| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 600 人关注过本帖
标题:如何實現不同域名調用不同head?
只看楼主 加入收藏
bxyl
Rank: 1
等 级:新手上路
帖 子:45
专家分:0
注 册:2007-10-14
收藏
 问题点数:0 回复次数:2 
如何實現不同域名調用不同head?

以下是我的首頁index.asp和頭部head.asp的代碼,我有兩個域名,我要如何做才能讓它實現不同的域名調用不同的head ?希望哪位高手幫我一下,非常感謝!

index.asp如下:

<!--#include file="head.asp"--><body bgcolor="#FFFFFF">
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="505" valign="top" height="61">
<table width="100%" height="585" border="0" cellpadding="0" cellspacing="1" bgcolor="00A0E8">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="152" width="44%">
<table width="213" border="0" cellspacing="6" cellpadding="0">
<tr>
<td>
<div align="center">
<!--#include file="js/top.asp" -->
</div>
</td>
</tr>
</table>
</td>
<td height="152" width="56%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="7" width="175" bgcolor="#FFFFFF"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="25">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/top00101.jpg">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="25">
<tr>
<td width="100" background="images/top0010.jpg">
<div align="center"><b><font color="#FFFFFF">新闻动态--></font></b></div>
</td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%">
<div align="right"> </div>
</td>
<td width="50%">
<div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="22"><img src="images/ico_sift_tit.gif" width="18" height="15"></td>
<td>
<a href="type_news.asp?name=新闻动态&city=<%=request("city")%>" target="_blank">更多新闻</a></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<p style="line-height: 150%"> <span style="font-size: 9pt">
</span><span style="font-size: 9pt">
<!-- 热点分类信息 -->
<%sql="select top 8 title,adid,color,date from news_data where type='新闻动态' and stop >= date() and mark='yes' order by adid desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then%>
<font color='#FF0000'>暂无新闻动态!</font>
<%
else
do while not rs.eof%>
</span><span style="font-size: 9pt">·</span><span style="font-size: 9pt"><a title=<%=rs("title")%> href="html/news/<%=rs("adid")%>.htm" target="_blank"><font style="size:12px " <%if rs("color")<>"" then%>color="<%=rs("color")%>"<%end if%>><%=left(rs("title"),20)%></font></a><b><span style="font-size: 9pt"><font color="#008000">&nbsp;</font></span></b><font color="#008080" style="font-size: 9pt"><%=mid(DateValue(rs("date")),6)%></font><br>
<%rs.movenext
loop
end if
rs.close%>
<!--這中間還有首頁的相關代碼省略-->
<!-- 这里是主题结束 -->
<!--#include file="foot.asp"-->
<% if switch_onlingQQ ="1" then %>
<!--#include file="qqOline.asp" -->
<% end if %>
<%if picpass(4)="yes" then%>
<!--#include file="js/duilian.asp"-->
<%end if%>
<!--#include file="js/duilians.asp"-->
<%if picpass(7)="yes" then%>
<!--#include file="js/windows.asp"-->
<%end if%>
<%if picpass(8)="yes" then%>
<!--#include file="js/piao.asp"-->
<%end if%>

head.asp如下:

[此贴子已经被作者于2007-10-15 10:55:51编辑过]

搜索更多相关主题的帖子: 域名 head 
2007-10-15 10:24
bxyl
Rank: 1
等 级:新手上路
帖 子:45
专家分:0
注 册:2007-10-14
收藏
得分:0 
head.asp代碼如下:
[CODE]<!--#include file="conn.asp"-->
<HTML>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script><%dim getdate
city_oneid=HtmlEncode(trim(request("city_oneid")))
city_twoid=HtmlEncode(trim(request("city_twoid")))
city_threeid=HtmlEncode(trim(request("city_threeid")))
if city_oneid="" then city_oneid=0
if city_twoid="" then city_twoid=0
if city_threeid="" then city_threeid=0
sql="select * from china_ad"
set rsgg=server.createObject("ADODB.recordset")
rsgg.open sql,conn,1,3
if not rsgg.eof then
dim picname(13)
dim piclink(13)
dim picpass(13)
for i = 1 to 13
picname(i) = rsgg("picname")
piclink(i) = rsgg("piclink")
picpass(i)= rsgg("pass")
rsgg.movenext
next
end if
rsgg.close
set rsgg=nothing
if city_oneid<>0 then
sql="select * from china_city where id="&city_oneid&" and twoid="&city_twoid&" and threeid="&city_threeid&""
set rs=server.createObject("ADODB.recordset")
rs.open sql,conn,1,1
if rs.eof then
rs.close:set rs=nothing
conn.close:set conn=nothing
response.Write("错误参数")
response.end
else
thecity=rs("city")
end if
rs.close
set rs=nothing
webtitle=thecity&"分站 "&webtitle
end if
%>
<HEAD>
<TITLE><%=webtitle%></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<META content="<%=webdescription%> " name=description>
<META content="<%=webkeywords%>" name=keywords>
<link rel="stylesheet" type="text/css" href="css/style.css">
<style>
<!--
td { font-size: 12px; line-height: 17px }
body { font-size: 12px; line-height: 17px }
p { margin-top: 1; margin-bottom: 1 }
form { margin-top: 2; margin-bottom: 2 }
a:link { text-decoration: line; color: black }
a:hover { text-decoration: underline; color: red }
a:visited { text-decoration: line; color: black }
.menufont { FILTER: glow(color=f9ab77,strength=1); POSITION: relative; WIDTH: 100%}
.3dfont { FILTER: glow(color=ffffff,strength=1) shadow(color=cccccc,direction:135); POSITION: relative; WIDTH: 100% }
body,p,td { font-family:Verdana, Arial, Helvetica, sans-serif; }
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Times New Roman";
margin-left:0cm; margin-right:0cm; margin-top:0cm}
.style1 {color: #FFFFFF}
-->
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<div align="center"> </div>
<!-- 这里是头部 -->[/CODE]
2007-10-15 10:25
bxyl
Rank: 1
等 级:新手上路
帖 子:45
专家分:0
注 册:2007-10-14
收藏
得分:0 

沒人知道啊

[此贴子已经被作者于2007-10-15 10:55:28编辑过]

2007-10-15 10:26
快速回复:如何實現不同域名調用不同head?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027560 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved