Use JavaScript to display a drag calendar in a Web page

Source: Internet
Author: User

The specific production steps are as follows:

1. Start Dreamweaver MX, create a new HTML document, switch to Code view, and write JavaScript scripts.

(1) Insert the following JavaScript script in the

(2) Insert JavaScript script in HTML document body <body>...</body>, and add some attributes to <body> tag:

2, switch to Design view, insert a layer in the page, and put the JavaScript script icon representing the body of the HTML document (if the icon does not appear, select view>visual aids>invisible Elements menu command) to drag into the layer, As shown in the following figure.

3, select the layer in the page, then in the Behaviors (behavior) panel (if not open, select Window>behaviors), click the "+" button, from the pop-up menu select drag Layer (drag layer) command.

4, in the Pop-up Drag Layer dialog box with the default option, click the OK button. At this point, the Behaviors panel adds the onclick (click) event and the drag layer action.

5, save the file, browsing in the browser, with the mouse hold down the monthly calendar can be dragged freely in the page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.