ASP下的用法:
dim text
text =”how are you doing today?”
shuzu= split(text,”")
for i=1 to UBound(shuzu)
response.Write(shuzu(i)&”<br/>”)
next
输出为:
how
are
you
doing
today?
JAVASCRIPT下的用法:
<script type=”text/javascript”>
var text = “how are you doing today?”
document.write(text.split(” “) + “<br/>”)
document.write(text.split(” “) + “<br/>”)
document.write(text.split(” “,3))
</script>
输出为:
how,are,you,doing,today?
h,o,w, ,a,r,e, ,y,o,u, ,d,o,i,n,g, ,t,o,d,a,y,?
how,are,you
我觉得行,文章写的不错!