1
我編寫了像這樣的動態選擇國家城市的代碼。在Mozila,Chrome,Opera,Safari和Internet Explorer上運行良好的代碼,但國家城市代碼的動態選擇是不適用於Internet Explorer 及更早版本。動態選擇使用javascript的國家城市
<form method=post id="formname" name="formname" action=eaccountdb.php
enctype="multipart/form-data" onsubmit="return Validate();">
<table class="style2">
<tr>
<td>
<table align="left" width="100%">
<tr>
<td align="left">
<label for="country">Country*</label>
<?php
$country = $_GET['country'];
if ($country == null)
{
$data = mysql_query("select * from country where countryname !='$country'");
echo "
<select name='country' style='width:150px' id='country'
onchange='show_country(this.value);'>
<option>Select Country</option>";
while ($info = mysql_fetch_array($data))
{
echo "<option>". $info['countryname']."</option>" ;
}
echo "</select>";
}
...
請發佈傳遞給瀏覽器的代碼,而不是生成它的代碼。 – RobG