我有一對JavaScript函數,它將我設置的URL連接到變量c。然後我嘗試在變量傳遞到jQote2:如何將額外的變量和參數傳遞給jQote2?
$.get("emptyReq.tpl", function(tmpl,c) {
$("#reqs").jqoteapp(tmpl, result, c);
});
在emptyReq.tmpl,我做了以下內容:
<tr id="row">
<td name="id" class="id"><a href="<%=this.c%>"><%= this.FormattedID %></a></td>
<td name="name" class="name"><%= this._refObjectName %></td>
<td name="state" class="state"><%= this.ScheduleState %></td>
<td name="owner" class="owner"></td>
</tr>
我已經試過了幾個變化(this.c和c ),我也嘗試了不同的變量,但我無法獲得正確顯示的URL。
Ç被標記爲控制檯undefined,並且在URL結束是這樣的:http://127.0.0.1/xampp/py2/undefined,而不是實際Ç這是像https://rally1.rallydev.com/slm/rally.sp#/2735190513d/detail/userstory/4599269614
有沒有辦法正確傳遞參數?或者我應該在.tmpl文件本身中進行串聯?
這是我一直用作參考:jQote Reference。