Jump to content

Print javascript variable


phpgoal

Recommended Posts

Hello,

 

I simply want to print out a javascript variable in html. How can i do it?

<html>
<body>
 
 <script type="text/javascript">
 
if (datestr == 'September 2020') {var newdate = 'September 2020';}
</script>
 
// How to store the newdate into another variable and how to print it in 
html.
 
</body>
</html>
Link to comment
https://forums.phpfreaks.com/topic/279116-print-javascript-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.