Skip to content

Instantly share code, notes, and snippets.

@honda0510
Created February 2, 2011 05:44
Show Gist options
  • Save honda0510/807300 to your computer and use it in GitHub Desktop.
Save honda0510/807300 to your computer and use it in GitHub Desktop.
複数のコントロールに同じイベントを設定する、hta + jQuery のサンプル
<!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" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>hta + jQuery sample</title>
</head>
<body>
<button>ELMO</button><br />
<button>BIG BIRD</button><br />
<button>COOKIE MONSTER</button><br />
<script type="text/JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/JavaScript">
(function($) {
$(window).bind('load',
function(e) {
window.resizeTo(300, 150);
}
);
$('button').click(
function(e) {
alert(this.value);
}
);
})(jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment