Javascript

Select Option

스크립트로 Select Option 선택/변경하기

// value 값으로 선택
$("#select_id").val("1").prop("selected", true);
 
// OR option 순서값으로 선택
$("#select_id option:eq(0)").prop("selected", true);

Subscribe to Keun's Story newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox. It's free!
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!