Introduction
I this news I am going to explain about Split function in jQuery. Split function
is used to split a string or text in to substrings. There are two parameter
separator and limit.
Syntax
text.split(separator, limit)
separator
Separator is used to specify number of character to use for splitting the text.
limit
It define an integer value that specify number of splits.
Example
<asp:Label
ID="msg" runat="server"
Text="Change
with the change otherwise change will change you"
/>
<script
type="text/javascript">
$(document).ready(function ()
{
var element = $("#msg").text().split("
");
alert(element);
});
</script>