大家好.我想获取所有UL的LI ID. [英] hello all.I want to get all the LI id's in UL.

查看:402
本文介绍了大家好.我想获取所有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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆