标签:ar sp java for bs ad html as javascript
以一个例子作为直观感受:
如下,把一个字符串截取后,加上换行,显示在界面上
<html> <title>test</title> <head> </head> <body> <span id="te"></span> </body> </html> <script type="text/javascript"> var str = 'aaa.bbb.ccc'; var ss = str.split('.'); var show = ''; for(var i=0;i<ss.length;i++){ show += ss[i]+'<br/>'; } document.getElementById("te").innerHTML = show; </script>
标签:ar sp java for bs ad html as javascript
原文地址:http://blog.csdn.net/helloboat/article/details/41681917