网页如何仅在浏览器中运行?

网页如何仅在浏览器中运行?

问题描述:


请说明如何在浏览器中运行网页? HTML,asp,aspx,php等类似代码仅在浏览器中运行.

Hi,
Please explain how does run web pages in browser? Html,asp,aspx,php, like this code only run in browser. how does it work?

这是因为浏览器是为运行HTML和javascript而构建的.它包含用于JavaScript的编译器和用于呈现HTML的引擎.

BTW,PHP或任何其他服务器端编程技术(例如asp.net)都不会在浏览器中运行.它在服务器上执行,网络服务器生成HTML并将其发送到发出请求的客户端的浏览器.浏览器显示内容将读取HTML标记并呈现它们的可视元素.

例如.浏览器接收<输入类型=按钮"....从网络服务器.并且呈现了一个可视按钮,用户可以查看并单击.
Its is because the browser is built for running HTML and javascript. It contains the compiler for javascript and engine for rendering the HTML.

BTW, PHP or any other server side programming technology like asp.net does not run in the browser. It executes on the server and the webserver generates the HTML and sends it to the requesting client''s browser. The browser displays reads the HTML tags and renders the visual elements for them.

For eg. The browser receives <input type="button" .... /> from the webserver. And it renders a visual button which the user can see and click.


阅读本文

http://forums.asp.net/t/1748497.aspx/1 [ ^ ]

http://computer.howstuffworks.com/web-page1.htm [ http://www.w3schools.com/html/html_intro.asp [
Read this article

http://forums.asp.net/t/1748497.aspx/1[^]

http://computer.howstuffworks.com/web-page1.htm[^]

http://www.w3schools.com/html/html_intro.asp[^]