<select id="drp1" onchange="fun1(this.value)">
<option value="0">India</option>
<option value="1">USA</option>
<option value="2">Pakistan</option>
</select>
<span id="sp1" style="border:1px solid silver">
<span id="sp2" >
</span>
<input type="text" id="txt">
</span>
<script src="jquery-1.3.js"></script>
<script>
var arr=new Array("+91","+00","+92");
function fun1(ind)
{
$("#sp2").html(arr[ind])
}
</script>
Output
0 comments:
Post a Comment