jQuery日本語リファレンス

jQuery does not mean Japanese Query...

ヌー

Core/API/jQuery - Sample Code

jQuery.extend(object)

	 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <script src="/jquery/js/jquery.js"></script>
 <script>
 jQuery.extend({
 min: function(a, b) { return a < b ? a : b; },
 max: function(a, b) { return a > b ? a : b; }
 });
 $(document).ready(function(){
 $("#check").click(function(){
 var a=parseInt($("#a").get(0).value);
 var b=parseInt($("#b").get(0).value);
 alert("max:"+jQuery.max(a,b)+", min:"+jQuery.min(a,b)+".");
 });
 });
 </script>
<body>
<form>
<div>
<input type="button" id="check" value="check" />
<input type="text" id="a" value="100" />
<input type="text" id="b" value="50" />
</div>
</form>
</body>
</html>
 
	 
[実行結果] [フレーム]
[jQuery.extend(object) の説明へ]
© Copyright 2009 by semooh.jp | Design by Free CSS Templates - Thanks to Dubai Apartments

AltStyle によって変換されたページ (->オリジナル) /