In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces Dreamweaver how to make a simple calendar template, the article is very detailed, has a certain reference value, interested friends must read it!
Dreamweaver wants to make a calendar, mainly using tables to make, function creation and call, if statement and for statement, ID tag application.
1. Open the Dreamweaver software and create a new HTML document. Add onload= "getRili ()" to the body tag to call the function of the following step. Create a new label for div inside body and define ID as date. As shown below:
2. Enter it in the tag of the new document, which is used to set a CSS style. Then enter the tag, which is used to create the calendar.
3. Enter a CSS style in this tag, and the function of the style is no longer explained here. Create a function getRili () in the tag.
4. Let's start with the implementation steps of the function's internal calendar. First, name the variables we need to use. It is listed here first, and then introduced when it is used below.
5, first enter two if statements in the function, the function of these two statements is to determine whether it is a leap year, so as to set the number of days in February. The following row variable is used to get the number of rows occupied each month, that is, how many lines there are when the page is displayed. Str is used to get the tables and text we want to enter.
6. Insert two for loops, the first for loop to get Sunday to Saturday, and save the output code into str. The second for loop, the first condition setting means that the number of lines in the month is guaranteed to be output, and the code meaning is used to create lines.
7. Nest a for loop in the second for loop and set the if conditional statement to determine the number of each month from which column to start the output. If it happens to be the current date, change the background color of the current cell.
8. The last two lines of code entered. The first line represents the end of the table. The second line is to save the generated code into the div whose ID is date. The production of such a calendar is completed! Save it and run it, and that's what the first picture looks like!
The above is all the content of the article "how to make a simple Calendar template in Dreamweaver". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.