检查用户输入的ISBN号码(可以带也可以不带连字符号)是否合法。 源代码如下: <?php/** Check to see if the entered isbn is valid and return* true or false depending.* I'm not even going to try to claim copyright for such* a simple thing. Do what you will with it.* 8-) Keith Nunn, kapn@anglican.ca*/funct...
function checkIP2(sIPAddress) { var exp=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; var reg = sIPAddress.match(exp); var ErrMsg="你输入的是一个非法的IP地址段!\nIP段为::xxx.xxx.xxx.xxx(xxx为0-255)!"&...