Server-side Script Beginner's Tutorial
HTML files can contain text, HTML tags, and scripts.
Scripts in HTML files can be executed on web servers.
Server-side script
Server-side scripts are the programming of server behavior. This is called server-side script or server script.
Client-side scripts are programming for browser behavior. (See) JavaScript Basic Tutorial)
什么是服务器脚本?
通常,当浏览器请求某个 HTML 文件时,服务器会返回此文件,但是假如此文件含有服务器端的脚本,那么在此 HTML 文件作为纯 HTML 被返回浏览器之前,首先会执行 HTML 文件中的脚本。
What can server scripts do?
- Dynamically edit, change, or add any content to web pages
- Respond to user requests or data submitted by HTML forms
- Access data or databases and return results to the browser
- Customize the page for different users
- Improve the security of web pages, so that your web page code will not be viewed by the browser
Important Note:Since the script is executed on the server, the browser can display the server-side files even if it does not support scripts!
ASP and PHP
At CodeW3C.com, we demonstrate server-side script programming by using Active Server Pages (ASP) and Hypertext Preprocessor (PHP).
You cannot view the source code of ASP or PHP by viewing the source code, what you see is just the output from the server, those pure HTML. This is because the script has been executed on the server before the result is sent to the browser as pure HTML.
ASP Example
- Writing text using ASP
- How to write text using ASP.
- Add HTML to text
- How to format text through HTML tags.
Script Tutorial
Please learn our complete ASP Tutorial And PHP Tutorial.