Học JavaScript qua ví dụ part 44

Giới thiệu về hình ảnh Một bức tranh trị giá một ngàn chữ. Dù đó là một trình chiếu, banner, phim, hoặc album ảnh, Web có chứa một bộ sưu tập lớn của hình ảnh. Bất cứ lúc nào bạn mua trực tuyến một cái gì đó, thường có một hình ảnh gắn liền với các mục, có thể là một hình ảnh nhỏ, và sau đó là một hình ảnh lớn hơn nếu bạn muốn cụ thể hơn. Bất cứ điều gì, một cuốn sách, một căn nhà, một đôi giày, hoặc đồ chơi, chúng tôi muốn nhìn thấy nó. | chapter 12 Working with Images and Links Introduction to Images A picture is worth a thousand words. Whether it s a slide show banner movie or photo album the Web contains a huge collection of images. Any time you buy something online there is usually an image associated with the item maybe a small image and then a bigger image if you want more detail. Whatever it is a book a house a pair of shoes or a toy we like to see it before we put it in our virtual shopping cart and pay the money. Although the focus of this chapter is on JavaScript and images hypertext links are so closely intertwined with images and navigation they are also discussed here. Images can be links clickable image maps banners marquees billboards or roll-overs you name it. With HTML the images you load are static and just sit on the page. They cannot be changed without loading a brand new page and loading a lot of images takes time. JavaScript brings a new dimension to working with images. Instead of viewing a static image on the page you can create dynamic images that can be changed on the fly adding animation and drama to your Web page. For example you can create effects such rollovers slide shows cycling banners dynamic menus and more. Just as with forms JavaScript has access to every image on you page. Before getting into the fun of images we will look at how JavaScript accesses them. In Chapter 13 Handling Events and Chapter 15 The W3C DOM and JavaScript you utilize what you learn here to see the full potential of image manipulation with JavaScript. 413 From the Library of 414 Chapter 12 Working with Images and Links HTML Review of Images Before using images with JavaScript the following section reviews the basics of using images in a static Web page. Table lists HTML image tags. Table HTML Image Tags Tag Attributes Description IMG Starting tag for loading an image. ALIGN Floats the image either to the left or right side of the page or aligns the image with

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.