Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Web Developer Interviews:BootstrapFront End Web DeveloperHTML DeveloperHybrid Application DeveloperInternee PHP DeveloperJnr PHP/Codeigniter DeveloperJunior Developer PHPLaravel PHP DeveloperPython DeveloperRuby DeveloperTypographyWeb Developer & DesignerWeb Developer Cum SEO AnalystWeb Development NinjasWebsite DeveloperWordPress Themes Developer
Copyright © 2018. All Rights Reserved
Web Development Ninjas Interview Question:
Tell me how do you find all the selected options of HTML select tag?
Submitted by: MuhammadThis is one of the tricky jQuery question on Interviews. This is a basic question, but don’t expect every jQuery beginner to know about this. You can use the following jQuery selector to retrieve all the selected options of <select> tag with multiple=true :
$('[name=NameOfSelectedTag] :selected')
This code uses the attribute selector in combination of :selected selector, which returns only selected options. You can tweak this and instead of name, you can even use id attribute to retrieve
<select> tag.
Submitted by: Muhammad
$('[name=NameOfSelectedTag] :selected')
This code uses the attribute selector in combination of :selected selector, which returns only selected options. You can tweak this and instead of name, you can even use id attribute to retrieve
<select> tag.
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.