Move character before letters - Javascript String Operation

Javascript examples for String Operation:String Character

Description

Move character before letters

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 ww  .  j ava 2s . c o m*/
$('span.class1.class2.class3').text(function(i, t){
    return '*' + t.replace(/\*/,'');
});
    });

      </script> 
   </head> 
   <body> 
      <span class="class1 class2 class3 "> First name*: </span>  
   </body>
</html>

Related Tutorials