私はこのような文字列を持っています。文字列からスラッシュ(\)を削除する方法
""\"\\\"\\\\\\\"<img title='In Progress' src='img/In Progress.ico' class='clsstatusimginner'/><span class='clstaskidlink' title='Explore about Master Setting in TP' onclick='taskLink(13721,89,Explore about Master Setting in TP)'>Explore about Master Setting in TP</span>\\\\\\\"\\\"\"""
次のように文字列から画像タグを抽出しようとしています。 余分なスラッシュを削除するにはどうしたらいいですか?
<img title='In Progress' src='img/In Progress.ico' class='clsstatusimginner'/><span class='clstaskidlink' title='Explore about Master Setting in TP' onclick='taskLink(13721,89,Explore about Master Setting in TP)'>Explore about Master Setting in TP</span>
文字列からスラッシュ(「\」)を削除する必要があります。誰か助けてください。おかげさまで
更新1:私はこの原因の原因になっています。 しかし、なぜこれが起こっているのか分かりません。 問題がある:1以上
var vrTaskSubject= $("#lblTskSubject").text()
このような結果を与える:そして、できるだけ早く、これは文字列化されたとして、それはこれが与えている。この
vrTskSubject = JSON.stringify($("#lblTskSubject").text());
のようなより多くのスラッシュを追加しました
""\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"<img title='Planned' src='img/Planned.ico' class='clsstatusimginner'/><span class='clstaskidlink' title='Format the Campus drive machine and set up the machine ready for campus' onclick='taskLink(14492,133,Format the Campus drive machine and set up the machine ready for campus,)'>Format the Campus drive machine and set up the machine ready for campus</span>\\\\\\\\\\\\\\\"\\\\\\\"\\\"\"""
このような結果。
""\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"<img title='Planned' src='img/Planned.ico' class='clsstatusimginner'/><span class='clstaskidlink' title='Format the Campus drive machine and set up the machine ready for campus' onclick='taskLink(14492,133,Format the Campus drive machine and set up the machine ready for campus,)'>Format the Campus drive machine and set up the machine ready for campus</span>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"\\\"\"""
このように何度でも、文字列には多くのスラッシュが追加されています。 なぜこれを文字列化するのを助けてください。この背後には理由がありますか? 私はこの問題を解決するにはどうすればよい、
を使用してバックスラッシュ、余分な引用符を削除しますか?私はこれが固定されるべきであると思います。 –
今、私はそれがその起源であったかどうかわかりません。 とにかく私はその起源を把握しようとしましょう。 その後、私は戻ってきますが、何か解決策があれば、私と共有してください。 –
更新された質問 –