我的腳本transaction.php返回下列JSON格式HTML標記劍道UI電網返回JSON字符串
$TransactionSumary[0] = array(
'ExchangeRate' => 'USD = 7,800 | THB 250',
'Total' => '250,000 LAK',
'VAT' => '25,000 LAK',
'GrandTotalUSD' => '15.00',
'GrandTotalTHB' => '1,000',
'GrandTotalLAK' => '<span class="k-block k-success-colored">250,000</span>',
);
echo $_GET['callback']."(".json_encode($TransactionSumary).")";
請看GrandTotalLAK
,它包含一些HTML標籤,
問題是GrandTotalLAK
不顯示作爲HTML格式屬性它在劍道UI網格示出爲平坦的字符<span class="k-block k-success-colored">250,000</span>
,
如果我使用base64_encode("<span class="k-block k-success-colored">250,000</span>")
,以及如何將其在劍道UI網格列屬性解碼?
這裏是劍道UI電網cloumn財產
{ field:"GrandTotalLAK", title: "Grand Total (LAK)", width: "20%" },
非常感謝您!
OK了一些谷歌後,我發現解決方案
<div id="grid"></div> <script> $("#grid").kendoGrid({ columns: [ { field: "name", encoded: false } ], dataSource: [ { name: "<strong>Jane Doe</strong>" } ] }); </script>
感謝您的另一個解決方案我的朋友! –