How does JS run on the page?
Each and every modern web browser has a piece of software called a JavaScript engine.
This software allows the browser to look for JavaScript code in a web page then interpret this code so that the commands it represents can be executed on your computer.
When an end user types a link on his computer and presses enter, the browser sends a request for the data in that link, to a server. A server is a computer running a piece of software that receives requests and sends back responses.
The primary function of a web server is to store, process and deliver web pages to clients. The communication between client and server takes place using the Hypertext Transfer Protocol (HTTP).
This is a set of rules that govern communications between computers. Server responses delivered most frequently are web pages, which may have images, style sheets and scripts in addition to the text content.
$(document).ready(function(){
XT1
});
</script>
Live demo
$(document).ready(function() {
XT1
});
</script>