我对 html、php、javascript、mysql 很陌生。我使用包含 2011 到 2510 列表的 java 脚本创建了一个下拉菜单。在更新期间,我无法显示使用 java 脚本生成的存储值。我搜索但一无所获。部分代码......
<select name="eca">
<option id="eca" required="required" class="ecadetail" value="NSS" <?php if ($eca == 'NSS') echo 'selected="selected"';?>">NSS</option>
<option id="eca" required="required" class="ecadetail" value="NCC" <?php if ($eca == 'NCC') echo 'selected="selected"';?>">NCC</option>
<option id="eca" required="required" class="ecadetail" value="Cultural" <?php if ($eca == 'Cultural') echo 'selected="selected"';?>">Cultural</option>
</select>
</div>
<div class="label">Year</div>
<div class="inputyear">
<select name="years" >
<script language="JavaScript">
// loop to create the list
var year = 2010
for (var i=1; i <=500; i++)
{
year++;
document.write("<option>" + year + "</option>");
}
// end JS code hide -->
<option value="<?php if ($year == 'year') echo 'selected="selected"';?>"></script>
</script>
</select>
</div>
</div> <!-- end of 7th row -->
非洲经委会的价值工作正常。值 year 存储在 $year 中。请帮忙...