我有以下标记:
public static void connectToWifi(String ssid, String pass){
WifiManager myWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
WifiConfiguration conf = new WifiConfiguration();
conf.SSID = "\"" + ssid + "\"";
conf.preSharedKey = "\""+ pass +"\"";
conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
List<WifiConfiguration> list = MainActivity.wifi.getConfiguredNetworks();
for( WifiConfiguration i : list ) {
if(i.SSID != null && i.SSID.equals("\"" + ssid + "\"")) {
MainActivity.wifi.disconnect();
MainActivity.wifi.enableNetwork(i.networkId, true);
MainActivity.wifi.reconnect();
break;
}
}
}
&#13;
这是一张3x3的桌子,里面有9个单选按钮。我想配置它以便我可以:
这可能没有任何JavaScript吗?谢谢!
答案 0 :(得分:5)
您可以使行/列中的输入(根据您的需要)具有相同的名称,以便只能检查其中一个。
<table>
<tr>
<td><input type="radio" name="radio1"></td>
<td><input type="radio" name="radio1"></td>
<td><input type="radio" name="radio1"></td>
</tr>
<tr>
<td><input type="radio" name="radio2"></td>
<td><input type="radio" name="radio2"></td>
<td><input type="radio" name="radio2"></td>
</tr>
<tr>
<td><input type="radio" name="radio3"></td>
<td><input type="radio" name="radio3"></td>
<td><input type="radio" name="radio3"></td>
</tr>
</table>
<table>
<tr>
<td><input type="radio" name="radio1"></td>
<td><input type="radio" name="radio2"></td>
<td><input type="radio" name="radio3"></td>
</tr>
<tr>
<td><input type="radio" name="radio1"></td>
<td><input type="radio" name="radio2"></td>
<td><input type="radio" name="radio3"></td>
</tr>
<tr>
<td><input type="radio" name="radio1"></td>
<td><input type="radio" name="radio2"></td>
<td><input type="radio" name="radio3"></td>
</tr>
</table>