用ASP开发网页需要牢记的注意事项(2)
下面的示例使用的是 Microsoft JScript®:
<%@ LANGUAGE="JScript" %>
<%
Response.CodePage = 1252;
Response.Write("Hello, " + RemoveBadCharacters(Request.Form("UserName")));
Response.Write("<BR>This is why you received an error:");
function RemoveBadCharacters(strTemp) {
strTemp = strTemp.replace(/[^\s\w]/g,"");
return strTemp;
}
%>
这篇文章就介绍到这,希望大家多多支持黑区网络。
