通过class获取id值_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:56:17
Original
1318 people have browsed it


如何通过class取到id的“aaa”?
求高手解答


回复讨论(解决方案)

$('.name')[0].id

var arr = getElementsByClassName('name')
for (var i = 0, len = arr.length; i 

一楼正解。。

一楼正解。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template