:https://jsfiddle.net/wna21a1q/divの各行の先頭に特定の文字を追加する方法はありますか? (javacsript)私はのようなHTML要素に各行の先頭に文字を追加したい
を私が行うことができますどのようにwhith JS(:
<div id="container">
<p>first part here !</p>
but they is text here too
<span>and bla bla bla</span>
foo
<p>bar</p>
baz
</div>
がレンダリング
<div id="container">
<p>#first part here !</p>
#but they is text here too
<span>#and bla bla bla</span>
#foo
<p>#bar</p>
#baz
</div>
を期待またはjQuery)?
同様:
$('#container').addAtEachLine('#')
ことで任意の試み? – epascarello
replaceを使用して正規表現を使用する – daremachine
HTMLの正規表現を使用しないでください.....間違ったアドバイス – epascarello