خرید بک لینک

Vote count: 0

Hi I want to change certain words as user types in input box on run time. Is there anyway to do this as when i use replace jqeury function it replaces the value but does not allow me to change css of it. Thanks here is what i have achieved so far This is Javascript

$("#submit-button").click(function(){

var oldString = 'john',
newString = '<span id="newChrome">chrome</span>'


$("#text-editor").val($("#text-editor").val().replace(RegExp(oldString,"gi"),newString));


 });

This is HTML

 <input id="text-editor" maxlength="200" width:200px; />
 <button id="submit-button">Submit</button>

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 23 اسفند 1394 ساعت: 17:12

صفحه بندی