当用户在下拉列表中选择值时,它应该拆分该值并将其提供给 2 个文本输入,有人可以帮助我吗?我不知道该怎么做...
<div class="formitem">
<p style="float:left; width:300px;">Select Ad Size: <em>*</em></p>
<select class="formitem" id="s7" style="float:left;" name="size">
<option value="0;0">Custom</option>
<option value="300;250">Medium Rectangle (300x250)</option>
<option value="250;250">Square Pop-Up (250x250)</option>
<option value="240;400">Vertical Rectangle (240x400)</option>
<option value="336;280">Large Rectangle (336x280)</option>
<option value="180;150">Rectangle (180x150)</option>
<option value="300;100">3:1 Rectangle (300x100)</option>
<option value="720;300">Pop-Under (720x300)</option>
<option value="468;60">Full banner (468x60)</option>
<option value="234;60">Half banner (234x60)</option>
<option value="88;31">Micro bar (88x31)</option>
<option value="120;90">Button 1 (120x90)</option>
<option value="120;60">Button 2 (120x60)</option>
<option value="120;240">Vertical banner (120x240)</option>
<option value="125;125">Square button (125x125)</option>
<option value="728;90">Leaderboard (728x90)</option>
<option value="160;600">Wide skyscraper (160x600)</option>
<option value="120;600">Skyscraper (120x600)</option>
<option value="300;600">Half page ad (300x600)</option>
</select>
</div>
<div class="specialitem" style="height:90px;">
<p style="float:left; width:100px;">Width: <em>*</em></p>
<input type="text" name="widthbox" id="widthbox" class="textInput text-p5" style="width:80px;"/>
<p style="float:right;">px</p>
</div>
<div class="specialitem last" style="height:90px;">
<p style="float:left; width:100px;">Height: <em>*</em></p>
<input type="text" name="heightbox" id="heightbox" class="textInput text-p5" style="width:80px;"/>
<p style="float:right;">px</p>
</div>
因此,如果我选择“中矩形 (300x250)”,它应该将 Widthbox 值更新为 300,将 Heightbox 值更新为 250。
一些帮助会很好:)
谢谢