javascript - jQuery or JS turn all words into italic type -


var test = $('.text1').val(); var re = /\w+/g $('.text3').html(test.replace(re, '<i>' + test.match(/\w+/g) + '</i>')); 

if basic value "link text тест", return "<i>link,text</i> <i>link,text</i> тест". need "<i>link</i> <i>text</i> текст"

what can do?

couldn't do,

body {     font-style: italic; // add italic!important if need to... } 

your question isn't worded well.

otherwise if must jquery or js then...

$("*").css("font-style", "italic"); 

that should work.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -