求一个递归函数
求一个js递归函数
用js解析xml文件实现表格分级结构
具体结构如:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
如此结构,
需要表格表示
请各位赐教
------解决方案--------------------需求描述不清楚,xml文件表达有误.
你问问题还嫌麻烦的话就不要问好了,回答的人更嫌麻烦.
话说多了,默念一百遍:做人要厚道! sorry啊,飘过了....
------解决方案--------------------路过,递归还行,不熟xml..
------解决方案--------------------在IE中,可以把xml作为table的数据源的,直接显示出来
DATASRC Attribute | dataSrc Property Internet Development Index
--------------------------------------------
Sets or retrieves the source of the data for data binding.
Syntax
HTML <ELEMENT DATASRC = sID... >
Scripting object.dataSrc [ = sID ]
Possible Values
sID String that specifies or receives the identifier of the data source.
The property is read/write. The property has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
Remarks
Tabular and single-valued data consumers use the dataSrc property to specify a binding. The property takes a string that corresponds to the unique identifier of a data source object (DSO) on the page. The string must be prefixed by a number sign (#).
When the dataSrc property is applied to a tabular data consumer, the entire data set is repeated by the consuming elements.
When the dataSrc property is applied to a table, any contained single-valued consumer objects that specify a dataFld property are repeated for each record in the supplied data set. To complete the binding, the binding agent interrogates the enclosing table for its data source. A tabular data consumer contained within another tabular data consumer (table) must specify an explicit dataSrc.
Example
In this example, a text box is bound to the customer_name field of a data source object with an ID of "customer ". Because the text box is located within a data-bound table, the text box is repeated to display each of the records provided by the data source.
<TABLE DATASRC= "#customer ">
<TR> <TD> <INPUT TYPE=TEXTBOX DATAFLD= "customer_name "> <TD> <TR>
</TABLE>
Standards Information
There is no public standard that applies to this property.
------解决方案--------------------