我正在使用
jquery simplemodal
在屏幕上显示弹出框。我在不同的按钮点击上动态地将html附加到这个simplemodal框。 HTML包含在每个组中选择一个默认值的无线电组。默认选择出现在除safari之外的所有浏览器上。我需要safari浏览器上的默认选择。 下面是一个示例html,我将其附加到简单模态。
<div>
<b>How would you like your patty to be done ?
<can only choose one>
</b>
</div>
<table border="0" cellpadding="10" cellspacing="10">
<tr>
<td>
<input type="radio" checked="checked" value="Rare" name="patty" /><input type="hidden"
for="Rare" value="0" />
</td>
<td>
Rare
</td>
<td>
<input type="radio" value="Medium Rare" name="patty" /><input type="hidden" for="Medium Rare"
value="0" />
</td>
<td>
Medium Rare
</td>
<td>
<input type="radio" value="Medium" name="patty" /><input type="hidden" for="Medium"
value="0" />
</td>
<td>
Medium
</td>
</tr>
<tr>
<td>
<input type="radio" value="Medium Well" name="patty" /><input type="hidden" for="Medium Well"
value="0" />
</td>
<td>
Medium Well
</td>
<td>
<input type="radio" value="Well Done" name="patty" /><input type="hidden" for="Well Done"
value="0" />
</td>
<td>
Well Done
</td>
</tr>
</table>
<div>
<b>Choose your side.
<can choose only one>
</b>
</div>
<table border="0" cellpadding="10" cellspacing="10">
<tr>
<td>
<input type="radio" checked="checked" value="Salad" name="side" /><input type="hidden"
for="Salad" value="0" />
</td>
<td>
Salad
</td>
<td>
<input type="radio" value="Fries" name="side" /><input type="hidden" for="Fries"
value="0" />
</td>
<td>
Fries
</td>
<td>
<input type="radio" value="Onion Rings" name="side" /><input type="hidden" for="Onion Rings"
value="3" />
</td>
<td>
Onion Rings (Extra 3.0)
</td>
</tr>
<tr>
<td>
<input type="radio" value="Truffle Fries" name="side" /><input type="hidden" for="Truffle Fries"
value="3" />
</td>
<td>
Truffle Fries (Extra 3.0)
</td>
<td>
<input type="radio" value="Spam Fries" name="side" /><input type="hidden" for="Spam Fries"
value="3" />
</td>
<td>
Spam Fries (Extra 3.0)
</td>
</tr>
</table>
编辑:这是在IOS 5上发生的,而不是在IOS 6上发生的。