JQUERY Ŭ¸¯ À̺¥Æ® °Á¦ ¹ß»ý |
|
|
 |
8³â Àü |
<html xmlns=¡±http://www.w3.org/1999/xhtml¡°>
<head>
<title></title>
<style type=¡±text/css¡±>
.hover{}
</style>
<script src=¡±../js/jquery-1.3.2-vsdoc2.js¡± type=¡±text/javascript¡¡¡¡¡±></script>
<script type=¡±text/javascript¡¡¡¡¡±>
$(document).ready(function () {
//btnŬ¸¯ À̺¥Æ® ó¸®
$(¡°#btn¡±).click(function () { alert(¡®¹öÆ°ÀÌ Å¬¸¯µÇ¾ú½À´Ï´Ù.¡¯) });
//ÆäÀÌÁö ·Îµå½Ã ¹öÆ° Ŭ¸¯
$(¡®#my .hover¡¯).click(function () { alert(¡®¹öÆ°ÀÌ Å¬¸¯¡¯); });
$(¡®#my input[type=button]¡¯).one(¡°click¡±, function () {
alert(¡®¿ª½Ã ¹öÆ°ÀÌ »ç¿ëÀÚ¿¡ ÀÇÇؼ Ŭ¸¯µÊ¡¯);
});
$(¡®#btn¡¯).bind(¡°click¡±, function () { alert(¡®¹öÆ°ÀÌ Å¬¸¯µÊ¡¯); });
//¹öÆ° Ŭ¸¯ÀÌ ¾Æ´Ï¶ó Äڵ忡 ÀÇÇؼ clickÀ̺¥Æ®¸¦ ½ÇÇàÇÏ°í ½Í´Ù¸é?
$(¡®#btn¡¯).trigger(¡®click¡¯); //½ÇÇàÇÏÀÚ¸¶ÀÚ clickÀ̺¥Æ®¸¦ Æ®¸®°Å ÇÔ
});
</script>
</head>
<body>
<div id=¡±my¡±>
<input type=¡±button¡± id=¡±btn¡± value=¡±¹öÆ°¡± class=¡±hover¡± />
</div>
</body>
</html> |
|
̵̧ : 275 |
̵̧
¸ñ·Ï
|
|