The example in this article describes how to make a simple annual calendar using js. Share it with everyone for your reference. The details are as follows:
Today I learned how to use js to create an annual calendar. I reviewed the usage of this by the way. It is a little different from the tab production. I used innerHTML for the new one. I hope I can stick to it and all the js masters can give me some advice.
Usage of innerHtml
Now use the top.innerHTML=".........."; method to write HTML code to the location of this id.
For example, top.innerHTML=""; a button will appear at the corresponding position of top!
Program implementation ideas:
1. Similar to a tab, except there is a div at the bottom;
2. Use of innerHTML
3. Use of arrays
① Definition: arr[0,1,2,3]
② Use: arr[0]
4. String concatenation
① Function: Connect two strings “ ”
② Problem: Priority in connection Use () to solve
Implementation source code:
JavaScript:
HTML:
一月
二月
三月
四月
五月
六月
七月
八月
九月
十月
十一月
十二月
效果图如下:
希望本文所述对大家的javascript程序设计有所帮助。