Scene Project : back from the background data to be processed into a h5 codes and then render the page, the result is escaped as & times x.
Solution : There & times to string words into text.
Code is as follows :
<div id="content"></div>
<script> var dataArr = [{ "url":"www.aa.com?data={{data}}×tamp={{timestamp}}" },{ "url":"www.bb.com?data={{data}}×tamp={{timestamp}}" }]; var nodeStr ='<table>'; for(var i=0; i<dataArr.length; i++){ nodeStr += '<tr><td class="mark">'+ dataArr[i].url +'</td></tr>' } nodeStr += '</table>' $('#content').append(nodeStr);
// & times to prevent the escape of x, on the append () method
for (var I = 0; I <dataArr.length; I ++ ) {
var URL = dataArr [I] .url;
$ ( 'Mark.' ). EQ (I) .text (URL);
}
</ Script>
The results are as follows :