=====================================================================
下面是代码
=================================================================
<%
function Daohang()
dim Daohang1,sqlDaohang1
set Daohang1=Server.CreateObject("ADODB.recordset")
sqlDaohang1="select * from about order by px_id asc"
Daohang1.open sqlDaohang1,conn,1,1
if not Daohang1.bof then
do while not Daohang1.eof
if 这里怎么写(使下面的这个这个class='active'才能正常起作用) then
response.write"<li><ahref='"&Daohang1("url")&"' class='active' >"&Daohang1("title")&"</a></li>"
else
response.write"<li><a href='"&Daohang1("url")&"'>"&Daohang1("title")&"</a></li>"
end if
Daohang1.movenext
loop
else
response.write"<li>暂无栏目内容</li>"
end if
Daohang1.close
end function
%>
===================================================================================================
或者有其他的办法,请多多指点
response.write"<li><a href='"&Daohang1("url")&"' class='active' >"&Daohang1("title")&"</a></li>"
这是完全不可用的,是直接出错。
有没有其他的办法
错误类型:
Microsoft VBScript 编译器错误 (0x800A03EA)
语法错误
/config.asp, line 140, column 5
if 1==1 then
----^
导航条上有A,B,C,D,E 五个项
当点击A的时候,A的背景样式为CLASS=ACTIVE,其他的不变
当再点击B的时候,B的背景样式为CLASS=ACTIVE,而A的样式变回原无CLASS=ACTIVE的时候,其他的也不变
$(".navButton").change(function(){
$(this).addClass(active);
});