Used to use the Calendar control is directly downloaded from the Internet a set of source code to use, the heart has been a stalk, is to write a calendar control themselves, recently just came to interest, time also allowed, so I groped to write a, the function is still perfect, the interface will do. Perhaps the most worth to say is that the input control inside the right to display a button, I was directl
, M, 1), //Get the first day of the month
DayOfWeek = Firstday.getday ( The first day of the week (return [0-6], 0 for Sunday, 1 for Monday, etc.)
days_per_month = new Array (y), 31, 30, 31, 30, 3 1, 31, 30, 31, 30, 31),//Create month array
So you can finally get the number of rows in the table you want for the month:
var str_nums = Math.ceil ((DayOfWeek + days_per_month[m))/7); Determine the number of rows required for a date table
Two. Print the
Calendarxp is a powerful JavaScript calendar selection plug-in that supports multiple browsers and official addresses.Http://www.calendarxp.net /.
I studied this topic for a while today. By the way, I finished it. In fact, it is not difficult to modify a JS file in Chinese. For convenience, I will paste the result of modifying the JS file.
//////// JS theme file for popcalendarxp 9.0 ///////
Address: http
Believe someone will select the date in the page, you need to know the date of the lunar calendar! If it is Java, in the background can be converted in a flash, but on the page, through JavaScript to convert, I do not know that there are no good ideas? Just, some time ago, a friend asked such a question, and then wrote a demo to her, but also OK! I hope I can help you in need, OK, directly on the code, do n
Page calendar implemented by Javascript. For details about js learning, refer. :
CSS code:
The Code is as follows:
Script code:
The Code is as follows:
The effect is as follows:
The JavaScript code is as follows:
Copy Code code as follows:
var Calendar = function () {
var self = this;
Self.box = document.createelement ("div");
Self.head = document.createelement ("div");
Self.dateplace;
Self.body = document.createelement ("div");
Self.selectday;
Self.foot = document.createelement ("div");
Self.timeplace;
Self.dateinfo = {
"Now":
Effect Chart:
In fact, the way to learn is to search the way, will search to solve the problem faster.
Search method:
JavaScript Calendar Control site:jb51.net|
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Content as above, from ESRI website, connect: ArcGIS API for JavaScript 4.2"Get Started"Similar to the introduction of things, extract the most need to focus on a few examples. For example: Load map and view, load layers, use popup window, visualize, and use widgets. (WTF actually did not analyze you want to do things AH web In addition to the show should not have () *......@)"Mapping and Views" (click into
* function is not complete, but also need to modify their own /* Calendar control temporarily supports only input*/! (function (Win) {var options = {inputdom:document.getElementById (' txttime '),//Operation input event: ' Focus ',/ /Trigger Mode format: ' YYYY-MM-DD ',//Format min: ' 1900-1-1 ', max: ' 2099-12-31 ', fn:null}; Extension options options.extend = function (options) {for (var o in options) {//console.log (Options.haso Wnpr
Often use Google's friends must be vivid memories of Google Calendar control it, then we also to achieve a, although the function and effect is not comparable, but the important thing is the process of implementation.
here is the HTML structure to implement:
First, the algorithm of the calendar query:
W=y+parseint (Y/4) +parseint (C/4) -2*c+parseint (26* (m+1)/10) +d-1;
The following is a detailed descript
Using the JavaScript API provided by Baidu Maps, given the multi-point latitude and longitude coordinates, on the Baidu mapDisplay these coordinate points.This includes the individual point Adaptive map display , the icon for the custom coordinate point , and the addition of polylines between each point.The effect of the implementation is as follows:The steps are as follows:1. Page reference Baidu Map
JavaScript File API File Upload preview, api File Upload
For browser-based applications, accessing local files is a headache. What we can do is to useTo upload files. The implementation process is as follows: when a file is selected, the value Attribute stores the name of the file specified by the user, and when the form is submitted, the browser sends the conten
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.