Below code will split text of any element using JQuery. You can download the Jquery from
http://docs.jquery.com/Downloading_jQuery.
jQuery provides a method "split()", which splits the text. We can use any delimiter to split the text. I have used space to split.
<script type="text/javascript" src="Script/jquery-1.5.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var element = $("#lblMessage").text().split(' ');
alert(element);
});
</script>
Below is the label with ID "lblMessage", which we have used in jQuery to split the text.
<asp:Label ID="lblMessage" runat="server" Text="Dotnetfunda rocks"></asp:Label>
Enjoy..
For detailed walk through of split function visit
http://bit.ly/troMk4Visit my blog
http://jquerybyexample.blogspot.com/