Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 756 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
756
Dung lượng
12,02 MB
Nội dung
[...]... theJavaScript language; and you'll get an introduction to Ajax, the exciting combination of JavaScriptand other technologies that is enabling the next wave of interactivity and creativity forWeb sites file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %2 0Visual% 0the% 2 0Web% 2 06th% 20Edition%2 0(2006)/ 0321430328/ch01.html [03.07.2007 10:23:59] What JavaScript Is What JavaScript Is JavaScript is a programming... putting together Web pages As the Web grew, page designers' aspirations grew as well, and their demand for greater control over the look of the page forced HTML to change and become more complex Because the Web is a dynamic medium, page designers also wanted their pages to interact with the user, and it soon became obvious that HTML was insufficient to handle the demand Netscape invented JavaScript. .. any other sites JavaScript cannot read information from an opened Web page that came from another server In other words, a Web page can't read any information from other open windows and find out what else a surfer visiting the site is up to file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %2 0Visual% 2 Web% 2 06th% 20Edition%2 0(2006)/ 0321430328/ch01lev1sec5.html [03.07.2007 10:24:01] What Is Ajax? What Is Ajax? ... [03.07.2007 10:24:00] JavaScript Isn't Java To learn more about Java, we recommend Java 2 for the World Wide Web: VisualQuickStartGuide by Dori Smith file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %20Visua %2 06th% 20Edition%2 0(2006)/ 0321430328/ch01lev1sec2.html (2 of 2) [03.07.2007 10:24:00] Where JavaScript Came From Where JavaScript Came From If JavaScript isn't related to Java, then why do they have such... to your Web pages But if you're not a programmer, don't panic; there are lots of JavaScripts available on the Web that you can copy and modify for your own use with a minimum of effort In fact, standing on the shoulders of other programmers in this way is a great technique for getting comfortable with JavaScript To make it easier for you to get up and running with JavaScript, we have set up a Web site... or other Web programming But you shouldn't worry; throughout this book, we'll introduce each of these technologies By the time you get to theAjax chapters, the pieces that make it up should be old hat The benefit to Ajax is that most of the processing for the application is happening within the user's browser, and requests to the server for data are usually short So with Ajax, you can give users the. .. active onload The object finished loading onmouseover The cursor moved over an object onmouseout The cursor moved off an object onselect The user selected the contents of an object onsubmit The user submitted a form onunload The user left the page For example, let's say that our cat handles the event onpetting by performing the actions purr and stretch In JavaScript, if the user clicks a button, the onclick... course; all of the scripts were tested in Safari 2 That means that they should also work in other browsers derived from the WebKit engine that drives Safari (such as the Omni Group's OmniWeb), and on browsers based on the open-source KHTML rendering engine from which Safari got its start (such as Konqueror for Linux) file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %20Visu 2 0Web% 2 06th% 20Edition%2 0(2006)/ 0321430328/pref02.html... additional information specifying the applet When the browser sees the tag, it downloads the Java applet from the server, andthe applet then runs in the area of the screen specified in the tag (Figure 1.1) Figure 1.1 This Java applet plays a mean game of checkers [View full size image] file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %20Visua %2 06th% 20Edition%2 0(2006)/ 0321430328/ch01lev1sec2.html... Some JavaScript books print the scripts, and expect you to type in the examples We think that's way too retro for this day and age It was tough enough for us to do all that typing, and there's no reason you should have to repeat that work So we've prepared a companion Web site for this book, one that includes all of the scripts in the book, ready for you to just copy and paste into your own Web pages The . alt="" Visual QuickStart Guide JavaScript and Ajax for the Web, Sixth Edition Visual QuickStart Guide JavaScript and Ajax for the Web, Sixth Edition By Tom Negrino, Dori Smith Publisher: Peachpit. and more! file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %2 0Visual% 0the% 2 0Web% 2 06th% 20Edition%2 0(2006)/ 0321430328/main.html [03.07.2007 10:23:57] Table of Contents Visual QuickStart Guide. interactivity and creativity for Web sites. file:///Z| /Peachpit% 2 0Press/ (Peachpit% 2 0Press) %2 0Visual% 0the% 2 0Web% 2 06th% 20Edition%2 0(2006)/ 0321430328/ch01.html [03.07.2007 10:23:59] What JavaScript