- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript">var $j = jQuery.noConflict();</script>
- <script type="text/javascript" src="../prototype/prototype.js"></script>
- <SCRIPT LANGUAGE="JavaScript">
- var i=0;
- function add(obj){
- i=i+1;
- $j("#test").html(obj.value+i);
- }
- function change(obj,type){
- $j.get("url.php", {addressId:obj.value, type:type}, function(res) {
- })
- }
- </SCRIPT>
- <input name="id" id="id" type="button" οnclick="add(this)" value="haha" />
- <div id="test">123</div>
- <select οnchange="new Ajax.Updater('citydiv', 'url.php',{
- asynchronous:true, evalScripts:false,
- onComplete:function(request, json){},
- onLoading:function(request, json){},
- parameters:'name='+$F('province')});" id="province" name="province">
- <option value="1">Alberta</option>
- <option value="2">Manitoba</option>
- <option value="3">New Brunswick</option>
- <option value="4">Newfoundland and Labrador</option>
- <option value="5">Northwest Territories</option>
- <option value="6">Nova Scotia</option>
- <option value="7">Nunavut</option>
- <option selected="" value="8">Ontario</option>
- <option value="9">Prince Edward Island</option>
- <option value="10">Quebec</option>
- <option value="11">Saskatchewan</option>
- <option value="12">Yukon</option>
- </select>
- <div id="citydiv">hahahahahah</div>
- <input name="sl" id="sl" value="" οnchange="change(this,1)" />
html(), ajax.updater,onchange
最新推荐文章于 2022-07-08 10:56:57 发布