Select an element by its attribute when value is an array - Javascript jQuery

Javascript examples for jQuery:Array

Description

Select an element by its attribute when value is an array

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.2.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){// w ww .j a  v  a  2s  .c o m
var fwvs=$('select[name="site[new][fw][version]"]');
fwvs.css('border', 'solid 3px red');
    });

      </script> 
   </head> 
   <body> 
      <select name="site[new][fw][version]"></select>  
   </body>
</html>

Related Tutorials