【正文】
e height of the new window in pixels width width=200 determines the width of the new window in pixels titlebar titlebar=false removes the title bar from the new window 大連交通大學(xué) 2021 屆本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 3 location location includes the url / address text box in the new window menubar menubar includes a menu bar in the new window resize resize=off makes the new window a fixed size scrollbars scrollbars adds scrollbars to the new window status status includes a status bar for the new window toolbar toolbar=yes adds a toolbar for the new window WRITING FUNCTIONS Functions are small subprograms that are located within script tags between the head tags of an HTML document. Functions are executed when they are called by name from an event handler within the body of an HTML document. The basic structure of a function is as follows: function NameOfFunction( ) { Include JavaScript Code Here } EVENT HANDLERS The following example demonstrates the use of event handler onclick as well as the use of styles to control the appearance of buttons. Note that instead of using type=submit for the button the code simply says type=button. Copy and paste this entire set of code in to a new document and test it out. html head titleSample/title style type=text/css bigbutton {backgroundcolor : yellow。 fontfamily : arial。 fontsize :18px。 borderwidth : 。 大連交通大學(xué) 2021 屆本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 4 /form /body /html Changing the code for the button to read onclick=myfunction( ) will result in exactly the same thing as the previous example if the following function is included in a script between the head tags. Typically, you would write a function only if the event required more than one thing to happen. function myfunction( ) { = } The following are some of the event handlers that exist in javascript: Table12 event handlers that exist in javascript onfocus onblur onselect onchange onsubmit onclick onmouseover onmouseout onload onunload onabort onerror onreset onkeypress onkeyup onmousedown onmousemove onmouseup onmove onresize POPUP MENUS PopUp Menus can be quickly created by using the select tag as it was used in forms to create a drop down list. Set the value of each of the options in the select tag to the url of the new page to be displayed. Use the onchange event handler to set the location of the window to the selected value in the drop down list. For example, if the form is named myform, the select tag is named mychoices, and the value of each option is a url then the sta tement = will take you to the new page that was selected from the drop down list. By default only one item in a list is displayed by a select statement until the viewer clicks on the down arrow to expose the rest of the list. To display more that one item at a time (and create a text box with a vertical scrollbar) include the size attribute in the select tag. For example, size=5 will display the first five items in the list and add a vertical scroll bar to the box if there are more than 5 items in the list. MOUSEOVERS A mouseover refers to the effect that occurs when the properties of an object are changed 大連交通大學(xué) 2021 屆本科生畢業(yè)設(shè)計(jì)(論文)外文翻譯 5 if the mouse is positioned over the top of the object and then again if the mouse is removed from the object. The quickest way to generate a mouseover is to use the onmouseover and onmouseout event handlers in a form of inline style. Visit the style section of the DHTML page of this web site to see an example of mouseovers used with text as an inline style. Any style property that applies to a particular object can be changed as the result of a mouseover. Performing mouseovers wit