Thursday, 15 August 2013

javascript - How to I prevent user from typing the same tag in the Textext textarea -


I am using a plugin for the tag What is trying to get the items typed in the text Tags) to prevent duplicate.

Enter image details here

As you can see The "tag" tag above is typed twice, this user wants to stop typing duplicates. How can I do this?

I have come completely, but its functionality is different from what I want.

I am sure there is some good way to achieve this goal. help please!

Use below to get an inside text:

  Var txt = document.getElementById ('textarea'); Var insidetext = $ (txt). Parent (). Children ('div') Text ();   

The text will be in a consensual form. Therefore, when the user deletes the tag or creates a new tag, then you have to be careful.

To test the code above, run it in the console tab of the developer tool in the browser.

No comments:

Post a Comment