这件事曾经发生在我身上,所以我希望当我对不同的输入字段使用相同的ID时,我能做到这一点。。。
尝试检查输入字段中是否存在重复的ID。
<input type="" id="numberone" />
<input type="" id="numbertwo" />
<input type="" id="numberthree" />
Or in the case of meta boxes
(example from some meta boxes i created)
array(
\'name\' => __(\'Usage Instructions\', \'sagive\'),
\'desc\' => __(\'Please Insert all available data on this website to achive a great look for the business page\', \'sagive\'),
\'type\' => \'title\',
),
array(
\'name\' => __(\'Website URL\', \'sagive\'),
\'desc\' => __(\'(example: http://www.sagive.co.il)\', \'sagive\'),
\'id\' => $prefix . \'numberone\',
\'type\' => \'numberthree\',
),
array(
\'name\' => __(\'NoFollow Tag\', \'sagive\'),
\'desc\' => __(\'Would you like to use NoFollow for his website?\', \'sagive\'),
\'id\' => $prefix . \'numbertwo\',
\'type\' => \'radio\',
\'options\' => array(
array( \'name\' => __(\'Yes\', \'sagive\'), \'value\' => \'yes\', ),
array( \'name\' => __(\'No\', \'sagive\'), \'value\' => \'no\', ),
),
),
希望这能解决你的问题。
向你问好,萨吉夫