Skip to content

Instantly share code, notes, and snippets.

@springcome
Created October 18, 2013 02:15
Show Gist options
  • Save springcome/7035487 to your computer and use it in GitHub Desktop.
Save springcome/7035487 to your computer and use it in GitHub Desktop.
.change, jquery
<select id="selectId">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
// selected하는 항목이 변경될 경우 발생하는 이벤트이다.
// input, textarea, select, radio..등 요소가 변경될때 사용가능하다.
$('#selectId').change(function(){
console.log($(this).val());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment