ASP代码中的JS新闻调用代码怎么能让最新的新闻条目后显示NEW图标。主要是代码怎么修改。 10
Ifmode="js"Thenresponse.write(HtmlToJs(outCallStyle&"<tablewidth='"&width&"'height='"...
If mode="js" Then
response.write(HtmlToJs(outCallStyle &"<table width='"& width &"' height='"& height &"' cellpadding='0' cellspacing='0' class='OTCMStable'><tr>"))
infoNum = 0
Set infoexe=conobj.execute("select top "& recordNum &" IF_ID,IF_time,IF_theme,IF_img,IF_infoTypeDir,IF_datetimeDir,IF_URL from OT_info where IF_isAudit=1 and IF_state=1"& whereStr &" order by IF_"& orderSort &" DESC"& infoIdWhereStr)
If isImgNews=1 Then
Do Until infoexe.EOF
infoNum = infoNum + 1
If imgTheme=1 Then theme=StrLen(infoexe("IF_theme"),maxLen) Else theme=""
If Len(""& infoexe("IF_URL"))>3 Then hrefStr=infoexe("IF_URL") Else hrefStr=Url_NewsShowID(infoexe("IF_infoTypeDir"),infoexe("IF_datetimeDir"),infoexe("IF_ID"),0)
response.write(HtmlToJs("<td style='"& rowHeight &"width:"& tdWidth &"%;' valign='top' align='center'><a href='"& hrefStr &"' class='OTCMSfont' target='_blank'><img src='"& InfoImgFullUrl(infoexe("IF_img"),InfoImgDir) &"' style='width:"& imgW &"px;height:"& imgH &"px;' class='OTCMSimg' /><br />"& theme &"</a></td>"))
If infoNum Mod cols = 0 Then response.write(HtmlToJs("</tr><tr>"))
infoexe.moveNext()
Loop
Else
Do Until infoexe.EOF
infoNum = infoNum + 1
If Len(""& infoexe("IF_URL"))>3 Then hrefStr=infoexe("IF_URL") Else hrefStr=Url_NewsShowID(infoexe("IF_infoTypeDir"),infoexe("IF_datetimeDir"),infoexe("IF_ID"),0)
response.write(HtmlToJs("<td style='"& rowHeight &"width:"& tdWidth &"%;padding-left:3px;'><div style='float:right;'>"& TimeFormat(infoexe("IF_time")) &"</div><li><a href='"& hrefStr &"' class='OTCMSfont' target='_blank' title="& theme &"> "& StrLen(infoexe("IF_theme"),maxLen) &"</a>【在这里增加NEW图标】</li></td>"))
If infoNum Mod cols = 0 Then response.write(HtmlToJs("</tr><tr>"))
infoexe.moveNext()
Loop
End If
infoexe.close
Set infoexe=Nothing
response.write(HtmlToJs("</tr></table>")) 展开
response.write(HtmlToJs(outCallStyle &"<table width='"& width &"' height='"& height &"' cellpadding='0' cellspacing='0' class='OTCMStable'><tr>"))
infoNum = 0
Set infoexe=conobj.execute("select top "& recordNum &" IF_ID,IF_time,IF_theme,IF_img,IF_infoTypeDir,IF_datetimeDir,IF_URL from OT_info where IF_isAudit=1 and IF_state=1"& whereStr &" order by IF_"& orderSort &" DESC"& infoIdWhereStr)
If isImgNews=1 Then
Do Until infoexe.EOF
infoNum = infoNum + 1
If imgTheme=1 Then theme=StrLen(infoexe("IF_theme"),maxLen) Else theme=""
If Len(""& infoexe("IF_URL"))>3 Then hrefStr=infoexe("IF_URL") Else hrefStr=Url_NewsShowID(infoexe("IF_infoTypeDir"),infoexe("IF_datetimeDir"),infoexe("IF_ID"),0)
response.write(HtmlToJs("<td style='"& rowHeight &"width:"& tdWidth &"%;' valign='top' align='center'><a href='"& hrefStr &"' class='OTCMSfont' target='_blank'><img src='"& InfoImgFullUrl(infoexe("IF_img"),InfoImgDir) &"' style='width:"& imgW &"px;height:"& imgH &"px;' class='OTCMSimg' /><br />"& theme &"</a></td>"))
If infoNum Mod cols = 0 Then response.write(HtmlToJs("</tr><tr>"))
infoexe.moveNext()
Loop
Else
Do Until infoexe.EOF
infoNum = infoNum + 1
If Len(""& infoexe("IF_URL"))>3 Then hrefStr=infoexe("IF_URL") Else hrefStr=Url_NewsShowID(infoexe("IF_infoTypeDir"),infoexe("IF_datetimeDir"),infoexe("IF_ID"),0)
response.write(HtmlToJs("<td style='"& rowHeight &"width:"& tdWidth &"%;padding-left:3px;'><div style='float:right;'>"& TimeFormat(infoexe("IF_time")) &"</div><li><a href='"& hrefStr &"' class='OTCMSfont' target='_blank' title="& theme &"> "& StrLen(infoexe("IF_theme"),maxLen) &"</a>【在这里增加NEW图标】</li></td>"))
If infoNum Mod cols = 0 Then response.write(HtmlToJs("</tr><tr>"))
infoexe.moveNext()
Loop
End If
infoexe.close
Set infoexe=Nothing
response.write(HtmlToJs("</tr></table>")) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询