vendredi 29 mai 2015

How to make a word a link if the user has input # before it?

I am using this code:

<form oninput="x.value=a.value">Account Info <br>
<input type="text" id="a">First Name<br>
UserName <output name="x" for="a"></output>
</form>

I want i such a way that if the user inputs a word and he has place # before the word without space then how to make the word as a link. Means the tag which happens in facebook. Can it be done with java script and how.

This was just the example to demonstrate i want to intergrate this type in my project as comments. And it will be with php. Thanks

Aucun commentaire:

Enregistrer un commentaire