Latest news
Home » jQuery » How to explode a string to an array in javascript or jQuery

How to explode a string to an array in javascript or jQuery

Using javascript or jQuery function split() for explode string to array
Example:
if(jQuery.trim(jQuery(“#custom-email-input”).val()) != ”) {
var sCustomemails =   jQuery(“#custom-email-input”).val().split(‘,’);
alert(sCustomemails );
 

}

Leave a Reply

x

Check Also

How to Check Expired Sessions using jQuery Ajax and PHP

We can achieve using the php and ajax.The following ajax call execute in every 10 ...