在 grails 中处理 gsp 页面时发现 2 个具有非唯一 ID 的元素
Found 2 elements with non-unique id while working with gsp pages in grails
我创建了 2 个单选按钮
<g:radio name="accountType" value="prepaid"/> PREPAID
<g:radio name="accountType" value="postpaid"/> POSTPAID
我的 chrome 浏览器版本 67.0 开始显示以下错误
Found 2 elements with non-unique id
我发现id不能是唯一的,但是单选按钮怎么id不是唯一的。
ids必须唯一,但name值可以共享
<g:radio name="accountType" id="prepaid" value="prepaid"/> PREPAID
<g:radio name="accountType" id="postpaid" value="postpaid"/> POSTPAID
我创建了 2 个单选按钮
<g:radio name="accountType" value="prepaid"/> PREPAID
<g:radio name="accountType" value="postpaid"/> POSTPAID
我的 chrome 浏览器版本 67.0 开始显示以下错误
Found 2 elements with non-unique id
我发现id不能是唯一的,但是单选按钮怎么id不是唯一的。
ids必须唯一,但name值可以共享
<g:radio name="accountType" id="prepaid" value="prepaid"/> PREPAID
<g:radio name="accountType" id="postpaid" value="postpaid"/> POSTPAID