删除字符串端部的空格

  1. <html>
  2. <body>
  3.  
  4. <script type="text/vbscript">
  5. fname=" Bill "
  6. document.write("Hello" & trim(fname) & "Gates<br />")
  7. document.write("Hello" & rtrim(fname) & "Gates<br />")
  8. document.write("Hello" & ltrim(fname) & "Gates<br />")
  9. </script>
  10.  
  11. </body>
  12. </html>