0
我需要從下面的剪輯WRPCTokenUrl
CRM附件:獲取WRPCTokenURL從使用jQuery
<span id="crmAttachment"
tabIndex="0"
class="attachment"
title="Click to open"
attachmentId="{868FCA8E-C992-E511-9419-0050569E70E2}"
attachmentType="5"
merchantId="{D6DF1974-4CD8-DE11-BCF5-00155D010600}"
userId="{9D98CF02-A484-E511-9418-0050569E70E2}"
url="/Activities/Attachment/download.aspx"
"WRPCTokenUrl="Data I want to get""
HideOpenButton="0">
這是我迄今使用jQuery 1.9.1:
$.get(URL, function (data) {
var tempDom = $('<output>').append($.parseHTML(data));
var WRPCTokenElement = $(tempDom).find("crmAttachment");
if (WRPCTokenElement) {
var WRPCTokenUrl = WRPCTokenElement.attr("WRPCTokenUrl");
if (WRPCTokenUrl) {
URL = WRPCTokenUrl;
window.open(URL);
}
}
}, "html");
但問題似乎與「WRPCTokenURL」屬性之前和之後的額外引號有關,因此我無法更改該屬性。有任何想法嗎?