读书人

表格怎么生成XML并在文本框中显示!求

发布时间: 2012-09-15 19:09:28 作者: rapoo

表格如何生成XML并在文本框中显示!求解答!!

JScript code
<table border="0" cellpadding="0" cellspacing="0" width="100%">  <tr>  <div>  <input type="button" value="新增" onclick="AddRow()" />  <input type="button" value="删除选中行" onclick="DelRow()" />  </div>  </tr>  <tr>  <div style="padding: 6px 0 0 0;">  <table id="tb" border="1">  <tr>  <th class="cell_style1">  单价  </th>  <th class="cell_style1">  数量  </th>  <th class="cell_style1">  总价  </th>  <th class="cell_style2">  备注  </th>  </tr>  <tr>  <td>  <input type="text" class="cell_style1" onclick="SelectRow(this)" onchange="SumZJ(this)" />  </td>  <td>  <input type="text" class="cell_style1" onclick="SelectRow(this)" onchange="SumZJ(this)" />  </td>  <td>  <input type='text' class='cell_style1' onclick='SelectRow(this)' onchange='SumZJ(this)' />  </td>  <td>  <input type="text" class="cell_style2" onclick="SelectRow(this)" />  </td>  </tr>  </table>  </div>  </tr>  <tr>  <div style="padding: 6px 0 0 0;">  <input type="button" value="输出XML" onclick="OutXML()" />  </div>  </tr>  <tr>  <div style="padding: 4px 0 0 0;">  <input id="XML_Text" type="text" style="height: 40px; width: 560px;" />  </div>  </tr>  </table>


[解决办法]
你是说生成和表格格式一致的xml吗?
你的那段代码貌似可以看做一段xml??

读书人网 >JavaScript

热点推荐