Created
February 25, 2020 05:25
-
-
Save gitgitWi/6a235b79b153189b3c261066a808d750 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
<!-- | |
$(function() { | |
$('#btnClick').bind("click", function() { | |
alert('클릭됨'); | |
}); | |
$('#btnClick').bind("mouseover", function() { | |
document.getElementById('btnClick').style.backgroundColor = 'red'; | |
}); | |
$('#btnClick').bind("mouseout", function() { | |
$('#btnClick').get(0).style.backgroundColor = 'blue'; | |
}); | |
}); | |
--> | |
function fn1() {alert('클릭됨');} | |
function fn2() {document.getElementById('btnClick').style.backgroundColor = 'red';} | |
function fn3() {$('#btnClick').get(0).style.backgroundColor = 'blue';} | |
$(document).ready( | |
function() { | |
$('#btnClick').bind("click", fnc1); | |
$('#btnClick').bind("mouseover", fnc2); | |
$('#btnClick').bind("mouseout", fnc3); | |
} | |
) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment