Home > Web Front-end > JS Tutorial > body text

Complete example of national province and city second-level linkage drop-down selection menu implemented by js_javascript skills

WBOY
Release: 2016-05-16 15:44:53
Original
1319 people have browsed it

The example in this article describes the national province and city second-level linkage drop-down selection menu implemented by js. Share it with everyone for your reference. The details are as follows:

The screenshot of the running effect is as follows:

The online demo address is as follows:

http://demo.jb51.net/js/2015/js-province-city-cho-menu-codes/

The specific code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js全国省市二级联动下拉选择菜单</title>
</head>
<body>
<script language="javascript" src="city.js"></script>
<form action="" method=post name=form1>
<table width=300 border=0 cellspacing="0" cellpadding="1" !bgcolor=#FFFDE6>
<tr>
<td class="black_con9" align="right">省份:</td>
<td class="black_con9">
<select name="selectp" onChange="selectcityarea('selectp','selectc','form1');">
<option value="0" selected>选择省份</option>
</select>
</td>
</tr>
<tr>
<td class="black_con9" align="right">县/市:</td>
<td class="black_con9">
<select name="selectc">
<option value="0" selected>选择城市</option>
</select>
</td>
</tr>
</table>
</form>
<script language="javascript">
first("selectp","selectc","form1",0,0);
</script>
</body>
</html>
Copy after login

I hope this article will be helpful to everyone’s JavaScript programming design.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template