Wap1.2, Wap 2.0 Select Multiple 浏览器处理的区别
WAP1.2的DTD规范
<!ELEMENT select (optgroup|option)+>
<!ATTLIST select
title %vdata; #IMPLIED
name NMTOKEN #IMPLIED
value %vdata; #IMPLIED
iname NMTOKEN #IMPLIED
ivalue %vdata; #IMPLIED
multiple %boolean; "false"
tabindex %number; #IMPLIED
xml:lang NMTOKEN #IMPLIED
%coreattrs;
>
<!ELEMENT option (#PCDATA | onevent)*>
<!ATTLIST option
value %vdata; #IMPLIED
title %vdata; #IMPLIED
onpick %HREF; #IMPLIED
xml:lang NMTOKEN #IMPLIED
%coreattrs;
>
如果多选的情况下。
从规范中可以查找到Wap1.2规范对于多选列表的数据提交的格式是:
name=value1;value2;value3......
WAP2.0 DTA规范
<!ELEMENT select (optgroup|option)+> <!-- option selector -->
<!ATTLIST select
%attrs;
name CDATA #IMPLIED
size %Number; #IMPLIED
multiple (multiple) #IMPLIED
disabled (disabled) #IMPLIED
tabindex %Number; #IMPLIED
onfocus %Script; #IMPLIED
onblur %Script; #IMPLIED
onchange %Script; #IMPLIED
>
<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
<!ATTLIST option
%attrs;
selected (selected) #IMPLIED
disabled (disabled) #IMPLIED
label %Text; #IMPLIED
value CDATA #IMPLIED
>
WAP2.0 页面开发者在需要多选的是对name属性需要加[]加以区别。
浏览器处理的时候,会根据是否多选然后把select-option的数据携带发生出去。
发送的格式是:
name=value1&name=value2&name=value3.......
Wap1.2, Wap 2.0 Select Multiple 浏览器处理的区别
最新推荐文章于 2020-08-26 10:49:43 发布