Home » » How to convert a string to array in jquery ?

How to convert a string to array in jquery ?

Written By Unknown on Selasa, 27 Agustus 2013 | 06.36

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" >
$(document).ready(function(){
    $( document ).on("click",function(){
        var data="hello bro ..  how are you ??";
        alert('This is string : '+ data);
        var array_data=data.split(" ");
        alert("This is converted array : "+jQuery.each(array_data, function(index, value) {}));
});
});
</script>
</head>
<body>
converting  string to array in jquery ... on mouse click ..
</body>
</html>
Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger