a)Now just copy the above free JavaScript code in your web page inside the head tag.
b)Create a form with name "txtchk" and place a textbox & call it by name "mytextarea"
Ex:- <form name ="txtchk">
<input type="text" name="mytextarea" size="30" value="1 2 2 3 3 4 4 5 5 5"></form>
c)Create a button with name and call the function delrepeat(mytextarea)by using onclick event.
Ex- <input type="button" value="Remove Duplicates" onclick="delrepeat(mytextarea)"
>
d) Both the button and text area should be in the same form.
|