我可以在HTML元素的name属性中使用空格吗? [英] Can I use white spaces in the name attribute of an HTML element?
问题描述
我们可以在HTML元素的name属性中使用白色字符(如空格)吗?例如。
< input type =checkboxname =first check box>
我主要关注我们现在处于设计阶段,直到我们编写一些代码并测试它,很长一段时间才会通过,所以我问你有关这方面的专家。
谢谢!
是。
name属性包含 CDATA 一>。它可以是你喜欢的任何东西。
请注意, name
属性没有NAME标记作为其数据类型(尽管 id
属性没有( id
属性不带ID标记)),所以你不要没有对NAME标记施加限制。
A question has rised in my project team as we are designing a web page.
Can we use white characters (like space) in the name attribute of an HTML element ? eg. <input type="checkbox" name="first check box">
My concern is mainly the behavior of different browsers with such an attribute value.
We are now in the design phase, until we get to write some code and test this, a long time will pass, so I am asking you experts about this.
Thank you !
Yes.
The name attribute contains CDATA. It can be more or less anything you like.
Note that name
attributes do not have NAME tokens as their data type (although the id
attribute does (the id
attribute doesn't take an ID token)), so you don't have the restrictions imposed on NAME tokens.
这篇关于我可以在HTML元素的name属性中使用空格吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!