JQuery 分割字符串

JQuery 分割字符串

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
var arr = 'google,*,JavaWorld';
var strArray = arr.split(',');
for(var i in strArray){
alert(strArray[i]);
}
});
});
</script>
</head>
<body>
<h3></h3>
<button>点我</button>
</body>
</html>

菜鸟教程在线测试网址:

JQuery 分割字符串

上一篇:Spring学习总结(六)——Spring整合MyBatis完整示例


下一篇:jQuary总结4: jquery操作字符串