<script language="JavaScript">
// object of the String constructor.
String.prototype.trim = function()
{
// Use a regular expression to replace leading and trailing
// spaces with the empty string
return this.replace(/(^\s*)|(\s*$)/g, "");
}
// A string with spaces in it
var s = " leading and trailing spaces ";
// Remove the leading and trailing spaces
s = s.trim();
</script>


浙公网安备 33010602011771号