Recommended: 15 very useful examples in ASP programming (2) 8. Forcing the password input dialog box, put this sentence at the beginning of the page % response.status=401 not Authorized response.end % 9 How to transfer variables from one page to another? Use HIDDEN type to transfer variables % form method =post action=mynextpage.asp % for each item in request.form % input
function isCharsInBag (s, bag){
var i,c;
for (i = 0; i < s.length; i++)
{
c = s.charAt(i);//Characters in string s
if (bag.indexOf(c) > -1)
return c;
}
return ;
}
Check function:
functionischinese(s)
{
var errorChar;
var badChar = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789><,[]{}?/+=|//'/:;~!#$%()`;
errorChar = isCharsInBag(s, badChar)
if (errorChar != )
{
report=report+please re-enter Chinese/n;
return false;
}
return true;
}
Share: 15 very useful examples in ASP programming (1) 1. How to use Asp to determine the virtual physical path of your website? Use the Mappath method p align=centerfont size=4 face=Arialb The Physical path to this virtual website is: /b/font font color=#FF0000 size=6 face= Arial %= Server.MapPath(/)% /font/p 2. How do I