一些做网页的技巧

发表于 代码片段 分类,标签:

1、数据集不为空则显示

<%ifnot(rs.eofandrs.bof)then’检测记录集是否为空%><%else%>当前无日志<%endif%>

2、登录后返回并刷新源网页

<%url=request.ServerVariables("HTTP\_REFERER")%>Response.write("<scriptlanguage=javascript>alert(’感谢您留言!’)</script><metahttp-equiv=’refresh’content=’0;URL="&Url&"’>")

3、打开页面,光标定位于于输入框

<bodyonload="l();"><formname="form"><inputname="name"type="text"></form><scriptlanguage="javascript">functionl(){document.form.name.focus();}</script>

4、鼠标经过时的图片特效

<SCRIPT language=JavaScript1.2><!--function high(which2){theobject=which2highlighting=setInterval("highlightit(theobject)",50)}function low(which2){clearInterval(highlighting)which2.filters.alpha.opacity=40}function highlightit(cur2){if (cur2.filters.alpha.opacity<100)cur2.filters.alpha.opacity+=35else if (window.highlighting)clearInterval(highlighting)}</script><img src="bg.gif" class="../images/logo.png" onmouseout=low(this)onmouseover=high(this) style="FILTER: alpha(opacity=40)"/>

5、继续……