html中属性idx区别,html 中的name属性和id属性有什么区别? -凯发k8官方网
匿名用户
1级
2009-04-15 回答
id 是唯一表示 ,整个页面唯一的,不允许重复
name 也就是名字,可以重复,整个页面任意个
例如:
document.getelementbyidx("xxx") 取出来是唯一的
document.getelementsbyname("xxx") 取出来是个数组
下列有name属性
a, applet, attribute, button, embed, form, img, input type=button, input type=checkbox, input type=file, input type=hidden, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, link, map, object, rt, ruby, select, textarea
下面的有id,
style, a, acronym, address, applet, area, b, base, basefont, bdo, bgsound, big, blockquote, body, br, button, caption, center, cite, code, col, colgroup, comment, custom, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, frame, frameset, head, hn, hr, html, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=hidden, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, isindex, kbd, label, legend, li, link, listing, map, marquee, menu, nextid, nobr, noframes, noscript, object, ol, option, p, plaintext, pre, q, rt, ruby, s, samp, script, select, small, span, strike, strong, stylesheet, sub, sup, table, tbody, td, textarea, tfoot, th, thead, title, tr, tt, u, ul, var, wbr, xml, xmp
总结
以上是凯发k8官方网为你收集整理的html中属性idx区别,html 中的name属性和id属性有什么区别?的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇:
- 下一篇: