下面是我的 HTML 代码,我需要你的帮助来解决 2 个问题,
- 我需要
table
从代码中删除 a 并使其无表。 - 使用模板和 jQuery AJAX 呈现此代码的最佳方式,此处数据来自 XML 文件。
运行代码:http: //jsfiddle.net/samansari/ppu6T/
XML 数据:
$(function() {
$.ajax({
type: "POST",
url: "/echo/xml/",
dataType: "xml",
data: {
xml: "<data caption='Start Processes'><heading caption='Customer Registration'><info caption='Credit note approval' desc='Credit Note request form and approval process.'/></heading><heading caption='Installation'><info caption='Credit note approval' desc='Credit Note request form and approval process..'/><info caption='Credit And Rebill Note (smartforms)' desc='Generate and Process a Letter of Guarantee for the customer.'/></heading></data>>"
},
success: function(xml) {
console.log(xml);
}
});
});
HTML 代码:
<div id="navcontainer">
<ul>
<li>
<div class="gtpointer"><span>    Start Processes</span> </div>
<ul>
<li>
<span> <span class="gtpointer">Customer Registration</span> </span>
<ul>
<li>
<span>
<table width="100%" border="0">
<tr>
<td width="30%">
<span class="landingSubmenu"><a href="#">Credit note approval</a></span>
</td>
<td>
<span >Credit Note request form and approval process.</span>
</td>
</tr>
</table>
</span>
</li>
</ul>
</li>
<li>
<span> <span class="gtpointer">Installation</span> </span>
<ul>
<li>
<span>
<table width="100%" border="0">
<tr>
<td width="30%">
<span class="landingSubmenu"><a href="#">Credit note approval</a></span>
</td>
<td>
<span >Credit Note request form and approval process.</span>
</td>
</tr>
</table>
</span>
</li>
<li>
<span>
<table width="100%" border="0">
<tr>
<td width="30%">
<span class="landingSubmenu"><a href="#">Credit And Rebill Note (smartforms)</a></span>
</td>
<td>
<span >Generate and Process a Letter of Guarantee for the customer.</span>
</td>
</tr>
</table>
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
谢谢大家。