Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
simple Javascript code runs at clientside or serverside?
Posted

normally JS runs on the client side(browsers) only.
Developer can also write event driven code on JS which can be execute some function on event and can be run on some engine like V8
http://code.google.com/p/v8/[^]

so there are some JS which we can say server side JS like node.js which using V8 engine(same engine use by chrome) for more reference :

http://en.wikipedia.org/wiki/JavaScript[^]
 
Share this answer
 
Comments
Aarti Meswania 1-Nov-12 6:19am    
thank you,
For clear my confusion
:)
Javascript code runs at clientside only. it mainly useful to validate client side validations.

http://www.w3schools.com/js/default.asp[^]
 
Share this answer
 
Comments
Aarti Meswania 1-Nov-12 6:19am    
thank you,
For clear my confusion
:)
Hey Aarti,

Javascript is kind of interpreted language, which is emited from server along with HTML and CSS. It runs on client side.
All browser has functionality by which it can understand the language.

tag in the HTML tells the browser that the next statemenet are script code rather than normal HTML until it hits .

For more details, you can check "Head First Javascript" or try www.w3schools.com/js/default.asp[^]

Hope that helps.
Milind
 
Share this answer
 
Comments
Aarti Meswania 1-Nov-12 6:19am    
thank you,
For clear my confusion
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900