日期:2014-05-16 浏览次数:20973 次
<script LANGUAGE="JAVASCRIPT">
//检查图片大小是否大于预期大小, 大于则显示为预期大小
function show(chkw) { //chk size
if(chkw>800) {
chkw=800;
}
else {
chkw=chkw;
}
return chkw;
}//script by shawl.qiu
//example: <img src="images/03.jpg" onClick="openautosize(this.src)" onload="this.width=show(this.width)">
//弹出窗口, 自适应图片大小,并自动居中显示
function openautosize(ourl) { //ourl 为接收图片地址
dimg = new Image(); //建立图像对象
dimg.src = ourl; //确定图像地址
w = dimg.width ; //图像宽度
h = dimg.height; //图像高度
x = (screen.width - w) / 2; //减去图片宽度, 然后宽/2
y = (screen.height - h) / 2; //减去图片高度, 然后宽/2
window.open(ourl,"newwindow","location=1,width="+w+",height="+h+",top="+y+",bottom="+y+",left="+x+",right="+x) ;
}//shawl.qiu script
//example: <img src="images/03.jpg" onClick="openautosize(this.src)" onload="this.width=show(this.width)">
</script>
<%
Const MaxLoopcount=50
function ubb(bod)
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
bod = dvHTMLEncode(bod)
re.Pattern="(javascript)"
bod=re.Replace(bod,"<I>javascript</I>")
re.Pattern="(jscript:)"
bod=re.Replace(bod,"<I>jscript:</I>")
re.Pattern="(js:)"
bod=re.Repl