<html> <body> <script type="text/javascript"> //1. trim()函数,去除前后空格 var str = " Hello" var str_trim = str.trim(); if(str_trim == 'Hello'){ alert("trim:"+str_trim); } </script> </body> </html>
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/17196.html