Example : How to pass value from jsp to java script (js) [ passing value from jsp to js ].
<% String str="Codershelpline"; %>
 
<html> 
   <head> 
      <script> 
         function access()
           { 
              var s="<%=str%>"; 
              alert(s); 
           } 
      </script> 
   </head> 
   <body onload="access()"> 
   </body> 
</html> 
Example : How to pass value from js to jsp [passing value from js to jsp].

Click this Link to go that Page

Example : How to pass value from php to js [passing value from js to php].
<?php $val=105; ?>
<!doctype html>
<html>	
	<head>
		<meta charset="utf-8">
		<title>Codershelpline</title>
		<script>
		    var output = <?php echo $val; ?>;				
		    document.write(output);  
		</script>
	</head>	
	<body></body>
</html>

Click this link to know, How to select combo box (static) data automatically by comparing it from database values [Combo Box Auto Select].

 1,833 total views,  1 views today


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.