
| 歡迎訪問全國企業(yè)網(wǎng)站設(shè)計(jì)NO.1網(wǎng)站開發(fā)商平臺(tái) | 付款方式 |
POST TIME:2020-10-09
$dsql->SetQuery("SELECT evalue,ename from `ddmx_sys_enum` where egroup='center' AND evalue%500 = 0 order by disorder asc, evalue asc");
$dsql->Execute();
$enums = array();
$sort = 1 ;
while($row = $dsql->GetArray())
{
$options .= "<option value=\"{$sort}\">{$row['ename']}</option>\r\n";
$enums[] = $row['evalue'];
$sort ++ ;
}
$count = count($enums);
foreach($enums as $i=>$evalue)
{
|
$dsql->SetQuery("SELECT evalue,ename,link from `ddmx_sys_enum` where egroup='center' AND evalue > {$evalue} AND evalue < ({$evalue} + 500) order by disorder asc, evalue asc");
$dsql->Execute();
$sort = 0 ;
$i++;
while($row = $dsql->GetArray())
{
$js .= "select2[". $i ."][{$sort}] = new Option(\"{$row['ename']}\", \"{$row['link']}\");\r\n";
$sort++;
}
}
$html = '
<form name="frm">
<div class="city_sch">
<h2 class="f13">選擇里您最近的學(xué)習(xí)中心</h2>
<table width="190" height="128" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="51" align="center" valign="middle"><label>
<select name="s1" onChange="redirec(document.frm.s1.options.selectedIndex)">
<option selected>點(diǎn)擊選擇城市</option>
'. $options .'
</select>
</label></td>
</tr>
<tr>
<td height="22" align="center" valign="middle"><label>
<select name="s2" id="s2">
<option value="點(diǎn)擊選擇中心" selected>點(diǎn)擊選擇中心</option>
</select>
</label></td>
</tr>
<tr>
<td height="55" align="center" valign="middle"><label>
<input type="submit" name="button" id="button" value="馬上提交" onclick="window.location=document.frm.s2.value;return false;"/>
</label></td>
</tr>
</table>
</div>
</form>
<script language="javascript">
var select1_len = document.frm.s1.options.length;
var select2 = new Array(select1_len);
for (i=0; i<select1_len; i++)
{
select2[i] = new Array();
}
select2[0][0] = new Option("請(qǐng)選擇", " ");
'. $js .'
function redirec(x)
{
var temp = document.frm.s2;
for (i=0;i<select2[x].length;i++)
{
temp.options[i]=new Option(select2[x][i].text,select2[x][i].value);
}
temp.options[0].selected=true;
}
</script>
';
$html = addslashes(str_replace(array("\r\n", '"'), array('', '\''), $html));
echo "document.write(\" $html \")";
?>
|
巨號(hào)網(wǎng)網(wǎng)站開發(fā)部為全國企業(yè)提供網(wǎng)頁設(shè)計(jì)和專業(yè)的公司網(wǎng)站制作等相關(guān)建站服務(wù),并提供24小時(shí)企業(yè)網(wǎng)站設(shè)計(jì)咨詢!
關(guān)于我們 建站知識(shí) 榮譽(yù)資質(zhì)網(wǎng)站地圖