Web pages are written in HTML, the web programming language that tells browsers how to lay out and present content on a web page. In other words, HTML provides the basic building blocks for the web. For a long time, those building blocks were pretty simple and static: lines of text, links and images.
众所周知,网页是用超文本标记语言(HTML)编写的,这种网页编程语言告诉浏览器怎样在网页中输出并 展现内容。换句话说,HTML就是网页这个建筑的一砖一瓦。长期以来,这些“砖瓦“都相当简单而且是静态的:仅有几行文字,或一些链接,或几张图片。
Today, the web goes beyond just text, links, and images. We expect to be able to play online chess or seamlessly scroll around a map of our neighborhood, without waiting for the entire page to reload for every chess move or every map scroll.
而今,网页中远不止文本,链接 和图片了。我们期望能够在线下象棋时,每走一步不必等待网页重新加载,或者查看一下我们周边的地图时,每拖到一下网页也不用重新刷新。
The idea of such dynamic web pages began with the invention of the scripting language JavaScript. JavaScript support in major web browsers meant that web pages could incorporate more meaningful real- time interactions. For example, if you’ve filled out an online form and hit the “submit” button, the web page can use JavaScript to check your entries in real-time and alert you almost instantly if you had filled out the form wrongly.
这些动态网页的创意开始与于脚本语言JavaScript的出现。主要的 网页浏览器都支持JavaScript,这就意味着网页能够加入一些更有意义的实时互动。例如,当你在线填一些表格时,点击“提交“按钮,网页可以调用 JavaScript代码来实时检查表格是否填错,如果有错误,网页马上就能提示你。
(全文 …)
Tags: CSS, HTML, JavaScript
Posted in Ajax, CSS, HTML, JavaScript