<html><head><title>JavaScript Math abs() Method</title></head><body><scripttype="text/javascript">var value =Math.abs(-1);
document.write("第一个测试值: "+ value );var value =Math.abs(null);
document.write("<br/>第二个测试值: "+ value );var value =Math.abs(20);
document.write("<br/>第三个测试值: "+ value );var value =Math.abs("string");
document.write("<br/>第四个测试值: "+ value );</script></body></html>