Select with escaped letter @ - Javascript jQuery

Javascript examples for jQuery:Selector

Description

Select with escaped letter @

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.9.1.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from w  w w  .ja  va2s. c om
a = 1;
b = 18;
c = "my@asdf.com";
var tempId = "#"+a+"_"+b+"_"+c;
console.log(tempId);
$("#1_18_my\\@asdf\\.com").text("some text");
    });

      </script> 
 </head> 
 <body> 
  <a id="1_18_my@asdf.com" class="big-link" href="">4</a>  
 </body>
</html>

Related Tutorials