Jquery for Select Country and State

hi...!!!  this  is    j query for  Country and State .this simple js for country and state it's free u need countries.js  this consists of country name and state  name  u can select country it's display to state  of  country .it's consists all  country and state but not in districts . 

  country : 


<select onchange="print_state('state',this.selectedIndex);" id="country" name ="country">
<option >Select Country</option>
</select>

u  can select  country it automatically  show the states  in the country there


State:    

<select name ="state" id ="state">
<option >Select State</option>
</select>

Source Code:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Select Country and State </title>
<script type= "text/javascript" src = "countries.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" width="500" align="center">
<tr>
<th colspan="2" ><p align="center">Select country and state </p></th>
</tr>
<tr>
<td>Select Country:</td>
<td> <select onchange="print_state('state',this.selectedIndex);" id="country" name ="country">
<option >Select Country</option>
</select></td>
</tr>
<tr>
<td>State:</td>
<td> <select name ="state" id ="state">
<option >Select State</option>
</select></td>
</tr>
</table>
<script language="javascript">print_country("country");</script>
</body>
</html>

No comments:

Post a Comment