大家好.我想获取所有UL的LI ID. [英] hello all.I want to get all the LI id's in UL.
本文介绍了大家好.我想获取所有UL的LI ID.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是javascript
的新手.
我可以将li
从一个table
拖到另一个java script
中.
li
具有唯一的ID,我想获取该LI
的所有ID,将其拖到html表tr,td ,ul
的以下标记中.
table
中有多行,每行都有一个ul
并拖动了li
.
获得该ID之后,我需要将其传递给数据库.
I am new to javascript
.
I able to drag li
from one table
to other in java script
.
The li
has unique id and i want to get all the id''s of that LI
which are drag to following tags of html table tr,td ,ul
.
There are multiple rows in that table
and every row is have one ul
and dragged li
.
After getting that id i need to pass it to the database.
推荐答案
您可以使用childNodes来获取它们.看看有关w3cschool的内容:
http://www.w3schools.com/dom/prop_element_childnodes.asp [ http://www.w3schools.com/jsref/dom_obj_all.asp [
You can use childNodes to to get them. Have a look at w3cschool about it:
http://www.w3schools.com/dom/prop_element_childnodes.asp[^]
Although the link above is for the xml reference it also aplies to HTML elements.
http://www.w3schools.com/jsref/dom_obj_all.asp[^]
Good luck!
这篇关于大家好.我想获取所有UL的LI ID.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文