本文介绍了Jquery附加不正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下jquery代码工作正常,但是Img标签没有附加在htmlContent字符串中。



Below jquery code works fine however Img tag is not getting appended in htmlContent string.

$(htmlContent).find('a.someClass').append(
    '<img src="https://pmcontent.blob.core.windows.net/images/oneDocument.png" title="click to send" />');





原始htmlContent字符串是





And original htmlContent string is

<div id="divContent">
<span style="font-family: ms sans serif;">
<br>
<br>
<a class="someClass" target="_blank" href="http://localhost/18054/Office/Docs/SignAgreement?primaryObjectId=835e2315-51d5-46f5-a260-236e858a7534&contactId=d1abf449-36c5-4617-8caf-6e529597eb8f&docId=1d136a29-09dc-4cea-a9e0-96b318eee919&filePath=test%252f92f70853ea5f4c2784f07ded02ab820f%252fMyDocuments%252fdigital%252bsignatured%252bdocs%252fHTML%252520Agreement%252520with%252520Signature.html%253f131022050245#_blank">click to sign</a>
</div>

推荐答案





和原始htmlContent s tring是





And original htmlContent string is

<div id="divContent">
<span style="font-family: ms sans serif;">
<br>
<br>
<a class="someClass" target="_blank" href="http://localhost/18054/Office/Docs/SignAgreement?primaryObjectId=835e2315-51d5-46f5-a260-236e858a7534&contactId=d1abf449-36c5-4617-8caf-6e529597eb8f&docId=1d136a29-09dc-4cea-a9e0-96b318eee919&filePath=test%252f92f70853ea5f4c2784f07ded02ab820f%252fMyDocuments%252fdigital%252bsignatured%252bdocs%252fHTML%252520Agreement%252520with%252520Signature.html%253f131022050245#_blank">click to sign</a>
</div>







添加了代码块[/ edit]



[edit]Code block added[/edit]


这篇关于Jquery附加不正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 06:34