$("#clientList").children('[value="zaza"]').attr('selected', true); //var customerID = window.location.hash; var customerID = "6a1920b2-f388-4790-a720-75048e1407a7"; Margarito Self. The :selected selector WebGet Attribute Of Selected Option Jquery With Code Examples. First there's the value to be sent to the server, For example, we will collect every country from the country table and then use Ajax and jQuery to collect all state selected. WebTo get only selected options text, you may use this in above example: 1. var selectedcolor = $('#jqueryselect option:selected').text(); See the demo and code online: See online demo $ (document).ready (function () {. })