Add symbol at front of each textarea line using jquery
pi don't know how to add this symbol '*' at front of every line of
textarea. I have a hidden textarea which is code#repmsg/code, and assume
that in that box have 3 line. I want when user click code#modquote/code,
the confirm box will appear, and when user click OK, inside the
codetextarea#modrepmsg/code will display /p precodegt;line1 gt;line2
gt;line3 /code/pre pHere my jquery code/p precode $( '#modquote')
.click(function() { if (confirm('ausdhkajsdhskj?')) { var comment =
$('#repmsg').val(); var regex = /lt;br\s*[\/]?gt;/gi; var repmsg =
comment.replace(regex, ) var quote = 'gt;' + repmsg;
$('textarea#modrepmsg').val(quote); } }); /code/pre pThanks for helping./p
No comments:
Post a Comment