JQuery selector for tag ID with / slash - Javascript jQuery

Javascript examples for jQuery:Tag Traversing

Description

JQuery selector for tag ID with / slash

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials