Có 60+ tài liệu thuộc chủ đề "thiết kế web với html và css"
tailieu.vn Xem trực tuyến Tải xuống
adding the <object>. Here’s the code:. <script type=”text/javascript” src=”swfobject.js”></script>. <script type=”text/javascript”>. <object id=”myId” classid=”clsid:D27CDB6E-AE6D-11cf-96B . width=”780” height=”420”>. <param name=”movie” value=”myContent.swf” />. <object type=”application/x-shockwave-flash” data=”myContent.swf” width=”780”. height=”420”>. </object>. Here’s the line between the opening and closing <script>. As you can see, SWFObject requires the ID of the <object>. <div id=”myContent”>. As you can see, the main difference is that the <object>....
tailieu.vn Xem trực tuyến Tải xuống
<object>...<object>. <param>...</param>. FIGURE 13.1 The Dunbar Project’s original website.. LISTING 13.1 Using <div>. <div id=”header”>. <div id=”sitenav”>. <ol><li><a href=”index.html”>Home</a></li>. <li><a href=”about/”>About the Dunbar Project</a></li>. <li><a href=”gallery/”>Photo Galleries</a></li>. <li><a href=”donate/”>Donate</a></li>. <li><a href=”contact/”>Contact</a></li></ol>. </div>. <div id=”main”>. <div id=”content”>. <img src=”DunbarTop.jpg” alt=”[Dunbar School]”>. The school was named after <a href=”poet.html”>Paul Laurence Dunbar</a>, a renowned African-American poet.. When segregation in Arizona was eliminated, Dunbar...
tailieu.vn Xem trực tuyến Tải xuống
n The first rule sets the margin and padding of the <body>. n The #sitenav rules in Listing 13.2 are used to turn the ordered list of links into a horizontal navigation bar.. n The #main section is also given a large padding on the right, 12em . This is where the #sidebar will be located.. n Absolute positioning is...
tailieu.vn Xem trực tuyến Tải xuống
ptg LISTING 13.6 Continued. 11.5em. margin-right: 11.5em. margin-top: 1.5em. CSS rules are easily obfuscated if you’re not careful. discipline is necessary to keep the style sheet readable.. The style sheet in Listing 13.7 is really the same style sheet as in Listing 13.6. Both are valid style sheets and both produce the same results when applied to the web page,...
tailieu.vn Xem trực tuyến Tải xuống
on the page. As you can see, document.write() adds text to the page source. What this code does is call the write method of the document object, which takes a single parameter—the text to be added to the page. For now, it’s important to know that the document object is a repre- sentation of the current page that is accessible...
tailieu.vn Xem trực tuyến Tải xuống
If you are passing arguments to a function, they are included in the parentheses in a comma-separated list.. Even if you’re not using arguments, the parentheses are still required. This is true whether you’re calling a function you wrote yourself or a function that’s built in to JavaScript.. I’ve mentioned JavaScript’s type system, but I haven’t talked much about JavaScript...
tailieu.vn Xem trực tuyến Tải xuống
It’s shown again in Figure 15.1. What happens when this form is submitted? In the real world, a script on the server side validates the data that the visitor entered, stores it in a database or file, and then thanks the visitor for her time.. But what happens if a visitor doesn’t fill out the form correctly—for example, she doesn’t...
tailieu.vn Xem trực tuyến Tải xuống
FIGURE 15.5 The FAQ page with the JavaScript included.. Here’s the JavaScript contained in the faq.js file:. ptg This JavaScript code is significantly more complex than any used previously in the book.. onload attribute of the <body>. tag to start up the JavaScript for the page, I assign an anonymous function to the onload property of the window object. You...
tailieu.vn Xem trực tuyến Tải xuống
It also explained how you can manipulate the styles on a page and even the contents of a page using JavaScript. The final two examples were written in a style referred to as unobtrusive JavaScript, which involves writing JavaScript in such a way that the page still works even if the user has disabled JavaScript, or their browser does not...
tailieu.vn Xem trực tuyến Tải xuống
Modifying Styles on the Page. Another powerful feature of jQuery is that it enables you to modify styles on the page on-the-fly. jQuery enables you to modify the page styles indirectly through convenience methods that hide and show elements, for example, and also enables you to directly mod- ify the page styles.. For example, you can hide and show elements...
tailieu.vn Xem trực tuyến Tải xuống
In this case, I put the value in the. tag, and pass that to the append() method. I also remove the content from the text field because it has been appended to the list. Figure 16.13 shows the list once a few elements have been added.. FIGURE 16.13 A page that allows you to add and remove content on-the-fly.. Finally,...
tailieu.vn Xem trực tuyến Tải xuống
What’s the basic function of a web server?. What are default index files, and what’s the advantage of using them in all directories?. Name some of the ways that you can promote your website.. You can obtain an Internet connection through school, work, or commercial Internet or web services, or you can set up your own web server.. Typical examples...
tailieu.vn Xem trực tuyến Tải xuống
The following. target=“blue_page” statement in the parent.html page is what causes the new window to open:. <a href=“blue.html” target=“blue_page”>Open</a>. the Blue Page in a new window.</p>. The third link, however, uses the target=“yellow_page” statement to open the green page in the window named yellow_page . You accomplish this using the following code in par- ent.html. <p><a href=“green.html” target=“yellow_page”>Replace</a>. the yellow...
tailieu.vn Xem trực tuyến Tải xuống
ptg In addition, the frameset is defined as having no borders, but the first frame is supposed. n Attributes in the outermost frameset have the lowest priority.. n Any bordercolor attribute in the current frame overrides previous ones in. Table 17.1 shows a few extra attributes for the <frame>. TABLE 17.1 Control Attributes for the <frame>. longdesc URL Specifies a...
tailieu.vn Xem trực tuyến Tải xuống
block is nested inside another, the nested block must replace one of the <frame>. In this case, you’ll replace the line that loads the temporary dummy.html page (which doesn’t really exist).. <frameset cols=”125,*”>. <frame src=”choice.html”>. <frameset rows=”60,*”>. <frame src=”away.html”>. <frame src=”reason1.html”>. The embedded rows frameset defines two rows, the first being 60% of the height of the embedded frame area...
tailieu.vn Xem trực tuyến Tải xuống
Instead of hard coding the URL, I pass this.href to the popup() function so that it opens the URL in the link.. Here’s the code:. When the page is ready, I apply the same onclick handler to all the links on the page with the class popup . The anonymous event handler opens a new window with the URL stored...
tailieu.vn Xem trực tuyến Tải xuống
If you look closely at the screenshot, you can see that at the time I validated this page, it came out with 42 errors, all of which are violations of the XHTML 1.0 Transitional rec- ommendation. The page looks fine in the popular browsers, but it’s not in sync with the recommendation. One common error that appears on this page...
tailieu.vn Xem trực tuyến Tải xuống
Without links, web pages would be dull and finding anything interesting on the Web would be close to impossible. Here’s some friendly advice on creating and using links.. If you organize your links into lists or other menu-like structures, your visitors can scan their options for the page quickly and easily.. For example, using menus of filenames or other mar-...
tailieu.vn Xem trực tuyến Tải xuống
n If you’re using a background image, make sure that it doesn’t interfere with the text—Some images may look interesting on their own but can make text diffi- cult to read when you put it on top of them. Your visitors are visiting your pages for their content, not to marvel at your ability to create faux marble in your...
tailieu.vn Xem trực tuyến Tải xuống
Make it easy for the visitor to scan for the important points on the page.. How can you arrange the information so that it’s easier to find the important points and links on the page?. Designing for the Real World. There’s another important fac- tor that you should take into consideration, and that’s how to design your pages for the...