r/shittyprogramming • u/07025 • Dec 06 '17
Server-side JavaScript code?
Hi I'm trying to make Server-sided JavaScript code. Can Someone help me?
4
Upvotes
r/shittyprogramming • u/07025 • Dec 06 '17
Hi I'm trying to make Server-sided JavaScript code. Can Someone help me?
46
u/[deleted] Dec 06 '17
Dude. ASP.NET has been doing this for years. Just add the runat attribute to the script tag.
<script runat="server"> // Put code here </script>
Just be careful to not use alert(), otherwise someone will have to log into the server to click "OK".
Good luck!