代码如下:<script language='JavaScript' type='text/JavaScript' src='js_white.asp?
BigClassName=
&SmallClassName=
&ArticleNum=6
&ShowType=1
&ShowCols=1
&ShowProperty=true
&ShowBigClassName=false
&ShowSmallClassName=false
&ShowIncludePic=true
&ShowTitle=true
&ShowUpdateTime=false
&ShowHits=false
&ShowAuthor=false
&ShowHot=false
&ShowMore=false
&TitleMaxLen=24
&ContentMaxLen=66
&Hot=false&Elite=false
&DateNum=
&OrderField=ArticleID
&OrderType=desc
&ImgWidth=66
&ImgHeight=88
'></script>
代码完
帮我解释一下好吗 我实在是看不懂吖 <script language='JavaScript' // 使用javascript语言
type='text/JavaScript' //这个是什么吖??这些参数是什么咧??
BigClassName=
&SmallClassName=
&ArticleNum=6
&ShowType=1
&ShowCols=1
&ShowProperty=true
&ShowBigClassName=false
&ShowSmallClassName=false
&ShowIncludePic=true
&ShowTitle=true
&ShowUpdateTime=false
&ShowHits=false
&ShowAuthor=false
&ShowHot=false
&ShowMore=false
&TitleMaxLen=24
&ContentMaxLen=66
&Hot=false&Elite=false
&DateNum=
&OrderField=ArticleID
&OrderType=desc
&ImgWidth=66
&ImgHeight=88
我真的很想弄明白
BigClassName=
&SmallClassName=
&ArticleNum=6
&ShowType=1
&ShowCols=1
&ShowProperty=true
&ShowBigClassName=false
&ShowSmallClassName=false
&ShowIncludePic=true
&ShowTitle=true
&ShowUpdateTime=false
&ShowHits=false
&ShowAuthor=false
&ShowHot=false
&ShowMore=false
&TitleMaxLen=24
&ContentMaxLen=66
&Hot=false&Elite=false
&DateNum=
&OrderField=ArticleID
&OrderType=desc
&ImgWidth=66
&ImgHeight=88
'></script>
代码完
帮我解释一下好吗 我实在是看不懂吖 <script language='JavaScript' // 使用javascript语言
type='text/JavaScript' //这个是什么吖??这些参数是什么咧??
BigClassName=
&SmallClassName=
&ArticleNum=6
&ShowType=1
&ShowCols=1
&ShowProperty=true
&ShowBigClassName=false
&ShowSmallClassName=false
&ShowIncludePic=true
&ShowTitle=true
&ShowUpdateTime=false
&ShowHits=false
&ShowAuthor=false
&ShowHot=false
&ShowMore=false
&TitleMaxLen=24
&ContentMaxLen=66
&Hot=false&Elite=false
&DateNum=
&OrderField=ArticleID
&OrderType=desc
&ImgWidth=66
&ImgHeight=88
我真的很想弄明白
那串参数是传个js_white.asp,然后在后台根据传入的参数生成JS的.
--------js_white.asp源代码--------------
<%
dim BigClassName,SmallClassName,ArticleNum,TitleMaxLen,ContentMaxLen,ShowType,ShowCols
dim ShowProperty,ShowBigClassName,ShowSmallClassName,ShowIncludePic,ShowTitle,ShowUpdateTime,ShowHits,ShowAuthor,ShowHot,ShowMore
dim Hot,Elite,DateNum,OrderField,OrderType,ImgWidth,ImgHeight
dim SystemPath,rs,sql,str,str1,topicLen,topic
dim i
BigClassName=trim(request.querystring("BigClassName"))
SmallClassName=trim(request.querystring("SmallClassName"))
ArticleNum=trim(request.querystring("ArticleNum"))
TitleMaxLen=trim(request.querystring("TitleMaxLen"))
ContentMaxLen=trim(request.querystring("ContentMaxLen"))
ShowType=trim(request.querystring("ShowType"))
ShowCols=trim(request.querystring("ShowCols"))
ShowProperty=trim(request.querystring("ShowProperty"))
ShowBigClassName=trim(request.querystring("ShowBigClassName"))
ShowSmallClassName=trim(request.querystring("ShowSmallClassName"))
ShowIncludePic=trim(request.querystring("ShowIncludePic"))
ShowTitle=trim(request.querystring("ShowTitle"))
ShowUpdateTime=trim(request.querystring("ShowUpdateTime"))
ShowHits=trim(request.querystring("ShowHits"))
ShowAuthor=trim(request.querystring("ShowAuthor"))
ShowHot=trim(request.querystring("ShowHot"))
ShowMore=trim(request.querystring("ShowMore"))
Hot=trim(request.querystring("Hot"))
Elite=trim(request.querystring("Elite"))
DateNum=trim(request.querystring("DateNum"))
OrderField=trim(request.querystring("OrderField"))
OrderType=trim(request.querystring("OrderType"))
ImgWidth=trim(request.querystring("ImgWidth"))
ImgHeight=trim(request.querystring("ImgHeight"))SystemPath="http://"&request.servervariables("server_name")&replace(request.servervariables("script_name"),"js_white.asp","")
if ShowType<>"" then
ShowType=Cint(ShowType)
else
ShowType=1
end if
if ShowCols<>"" then
ShowCols=Cint(ShowCols)
else
ShowCols=1
end if
if ContentMaxLen<>"" then
ContentMaxLen=Cint(ContentMaxLen)
else
ContentMaxLen=200
end ifsql="select"
if ArticleNum<>"" then sql=sql & " top " & Cint(ArticleNum)
sql=sql & " * from article where Passed=True"
if BigClassName<>"" then sql=sql & " and BigClassName='" & BigClassName & "'"
if SmallClassName<>"" then sql=sql & " and SmallClassName='" & SmallClassName & "'"
if ShowType=3 or ShowType=4 then sql=sql & " and DefaultPicUrl<>''"
if Hot="true" then sql=sql & " and Hits>=" & HitsOfHot
if Elite="true" then sql=sql & " and Elite=True"
if DateNum<>"" then sql=sql & " and DATEDIFF('d',UpdateTime,Now())<=" & Cint(DateNum)
sql=sql & " order by OnTop,UpdateTime desc"
if OrderField<>"" then sql=sql & " , " & OrderField
if OrderType<>"" then
sql=sql & " " & OrderType
else
sql=sql & " asc"
end ifset rs=server.createObject("Adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "document.write (" & Chr(34) & "该栏目信息还未录入" & Chr(34) & ");"
else
response.write "document.write (" & Chr(34) & "<table width='100%' cellspacing='5'><tr valign='top'>" & Chr(34) & ");" & vbcrlf
do while not rs.eof
if ShowType=1 or ShowType=2 then
str="<td>"
else
str="<td width='" & ImgWidth & "' align='center'><a href='" & SystemPath & "ArticleShow.asp?ArticleID=" & rs("articleid") & "' title='标题:" & rs("Title") & "\n" & "录入员:" & rs("Author") & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'><img src='" & rs("DefaultPicUrl") & "' width='" & ImgWidth & "' height='" & ImgHeight & "' border='0'></a><br>"
end if
if TitleMaxLen<>"" then
topic=gotTopic(rs("title"),Cint(TitleMaxLen))
else
topic=rs("title")
end if
if ShowProperty="true" then
if rs("OnTop")=true then
str=str & "<font color=ff0000>· </font>"
elseif rs("Elite")=true then
str=str & "<font color=ffffff>· </font>"
else
str=str & "<font color=ffff00>· </font>"
end if
end if
if ShowBigClassName="true" then
str=str & "[<a href='" & SystemPath & "Default.asp?BigClassName=" & rs("BigClassName") & "'>" & rs("BigClassName") & "</a>]"
end if
if ShowSmallClassName="true" then
str=str & "[<a href='" & SystemPath & "Default.asp?BigClassName=" & rs("BigClassName") & "&SmallClassName=" & rs("SmallClassName") & "'>" & rs("SmallClassName") & "</a>]"
end if
if ShowIncludePic="true" and rs("IncludePic")=true then
if TitleMaxLen<>"" then
if ShowHot="true" and rs("Hits")>=HitsOfHot then
topic=gotTopic(rs("title"),Cint(TitleMaxLen-8))
else
topic=gotTopic(rs("title"),Cint(TitleMaxLen-6))
end if
else
topic=rs("title")
end if
str=str & "<font color=ffff00>[图文]</font>"
if ShowTitle="true" then
str=str & "<a href='" & SystemPath & "ArticleShow.asp?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & rs("Author") & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' class=white target='_blank'>" & Topic & "</a>"
end if
end if if ShowIncludePic<>"true" or rs("IncludePic")<>true then
if TitleMaxLen<>"" then
if ShowHot="true" and rs("Hits")>=HitsOfHot then
topic=gotTopic(rs("title"),Cint(TitleMaxLen-8))
else
topic=gotTopic(rs("title"),Cint(TitleMaxLen-6))
end if
topic=gotTopic(rs("title"),Cint(TitleMaxLen))
else
topic=rs("title")
end if
if ShowTitle="true" then
str=str & "<a href='" & SystemPath & "ArticleShow.asp?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & rs("Author") & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' class=white target='_blank'>" & Topic & "</a>"
end if
end if
if ShowUpdateTime="true" then
str=str & " ["
if CDate(FormatDateTime(rs("UpdateTime"),2))=date() then
str=str & "<font color=red>"
else
str=str & "<font color=#666666>"
end if
str=str & FormatDateTime(rs("UpdateTime"),1) & "</font>]"
end if
if ShowHits="true" then
str=str & " [点击次数:" & rs("Hits") & "]"
end if
if ShowAuthor="true" then
str=str & " [录入员:" & rs("Author") & "]"
end if
if ShowHot="true" and rs("Hits")>=HitsOfHot then
str=str & "<img src='" & SystemPath & "images/hot.gif' align='absmiddle' alt='热点文章'>"
end if
if ShowType=2 then
str=str & "<div style='padding:10px 20px'>" & left(replace(replace(nohtml(rs("content")),chr(10),"\n"),chr(13),"\n"),ContentMaxLen) & "……</div>"
elseif ShowType=4 then
str=str & "</td><td>" & left(replace(replace(nohtml(rs("content")),chr(10),"\n"),chr(13),"\n"),ContentMaxLen) & "……"
end if
str=str & "</td>"
rs.movenext
i=i+1
if ((i mod ShowCols=0) and (not rs.eof)) then
str=str & "</tr><tr valign='top'>"
end if
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
loop
str="</tr>"
if ShowMore="true" then
str= "<tr><td colspan='" & ShowCols*2 & "' align='right'><a href='" & SystemPath & "Default2.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>>>>>>>更多</a></td>"
end if
str=str & "</table>"
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
end if
rs.close
set rs=nothing
call CloseConn()
%>
后面的代码好长...又没注释....
具体的意义要和你的系统想关联才知道吧...BigClassName=trim(request.querystring("BigClassName"))
SmallClassName=trim(request.querystring("SmallClassName"))
ArticleNum=trim(request.querystring("ArticleNum"))
TitleMaxLen=trim(request.querystring("TitleMaxLen"))
ContentMaxLen=trim(request.querystring("ContentMaxLen"))
ShowType=trim(request.querystring("ShowType"))
ShowCols=trim(request.querystring("ShowCols"))
ShowProperty=trim(request.querystring("ShowProperty"))
ShowBigClassName=trim(request.querystring("ShowBigClassName"))
ShowSmallClassName=trim(request.querystring("ShowSmallClassName"))
ShowIncludePic=trim(request.querystring("ShowIncludePic"))
ShowTitle=trim(request.querystring("ShowTitle"))
ShowUpdateTime=trim(request.querystring("ShowUpdateTime"))
ShowHits=trim(request.querystring("ShowHits"))
ShowAuthor=trim(request.querystring("ShowAuthor"))
ShowHot=trim(request.querystring("ShowHot"))
ShowMore=trim(request.querystring("ShowMore"))
Hot=trim(request.querystring("Hot"))
Elite=trim(request.querystring("Elite"))
DateNum=trim(request.querystring("DateNum"))
OrderField=trim(request.querystring("OrderField"))
OrderType=trim(request.querystring("OrderType"))
ImgWidth=trim(request.querystring("ImgWidth"))
ImgHeight=trim(request.querystring("ImgHeight")) 这段就是获取ASP后面的参数的.
你查查每一个的位置是干啥的就应该知道了...