'eval()' Example : Eval : Document JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Document » Eval »

 

'eval()' Example



    
<html>
<body>
<script language="javascript">
function function1(){
   var fullName = 'Joe';
   var mySentence = eval('"My name is " + fullName;');
   alert(mySentence); 
}
</script>
<button onclick="function1();">Eval function</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Document
» Eval