Javascript examples for jQuery:Tag Traversing
JQuery selector for tag ID with / slash
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.4.min.js"></script> <script type="text/javascript"> $(function(){/*from w w w . j av a 2s .com*/ console.log( $('select[id="/State"]').attr('id') ); }); </script> </head> <body> <select name="/State" id="/State"></select> </body> </html>