推薦:ASP讀sql數(shù)據(jù)時出現(xiàn)亂碼問題的解決方法如果你在做網(wǎng)站的時候,無法正確執(zhí)行sql語句,response后,發(fā)現(xiàn)sql語句里面的中文字段都成了亂碼,可以用下面的方法解決:
<%@ codepage=936%>簡體中文
<%@ codepage=950%>繁體
本文演示了ASP服務(wù)端腳本的幾個重要應(yīng)用。
目錄:
1、遍歷集合/對象
1.1 VBScript 遍歷表單集合
1.2 JScript 遍歷表單集合
2、轉(zhuǎn)變量值為變量, 并賦值
2.1 VBScript 轉(zhuǎn)變量值為變量并賦值
2.2 JScript 轉(zhuǎn)變量值為變量并賦值
3、動態(tài)包含文件
3.1 VBScript 動態(tài)包含文件
3.2 JScript 動態(tài)包含文件
以下為引用的內(nèi)容:
1、遍歷集合/對象
1.1 VBScript 遍歷表單集合
linenum <% for each temp in request.Form response.write temp&": "&request.form(temp) next %>
1.2 JScript 遍歷表單集合
linenum <% for (var $e=new Enumerator(Request.Form); !$e.atEnd(); $e.moveNext()){ Response.Write($e.item() ':<br/> ' Request.Form($e.item())); } %>
2、轉(zhuǎn)變量值為變量, 并賦值 2.1 VBScript 轉(zhuǎn)變量值為變量并賦值
linenum <% for each temp in request.Form execute temp&"=request.form(temp)" next %>
2.2 JScript 轉(zhuǎn)變量值為變量并賦值
linenum <% var $xml=new ActiveXObject("microsoft.xmldom"); $xml.load(Server.MapPath('config.xml')); var $childNodes=$xml.documentElement.selectSingleNode('//siteconfig').childNodes for ($e=new Enumerator($childNodes); !$e.atEnd(); $e.moveNext()){ eval($e.item().nodeName "=$e.item().text"); } $xml=null; Response.Write(sitekeywords); %>
3、動態(tài)包含文件 3.1 VBScript 動態(tài)包含文件
linenum <% function fInclude(filepath) ' sample call '''/// execute fInclude("include/system/language/"&sitefglang&"/main.asp") \\\''' dim cnt cnt=CreateObject("scripting.fileSystemObject").openTextFile(server.MapPath(filepath)).readall cnt=replace(cnt,"<"&chr(37),"") cnt=replace(cnt,chr(37)&">","") fInclude=cnt end function 'shawl.qiu code' execute fInclude("include/system/language/"&sitefglang&"/main.asp") %>
3.2 JScript 動態(tài)包含文件
linenum <% eval($dynInc('aj2.asp')); Response.Write($test); function $dynInc($fl){ /* ------------------------------------\ * 服務(wù)端 JScript 動態(tài)包含文件 By shawl.qiu * sample call: eval($dynInc('aj2.asp')); \*------------------------------------*/ var $fso=new ActiveXObject("scripting.fileSystemObject"); $str=$fso.OpenTextFile(Server.MapPath($fl)).ReadAll(); $str=$str.replace(/\<\%|\%\>/g,''); $fso=null; return $str; } %>
|
分享:ASPJPEG水印中關(guān)于文字水印的幫助文檔(中英文對照)Font Properties (字體屬性)
BkColor As Long (read/write) (背景顏色定義為長整性)
Specifies the font's background color. Font.BkMode must be set to anything other that "tra