1. 简单方法
HTML
<!-- The text field -->
<input type="text" value="Hello World" id="myInput">
<!-- The button used to copy the text -->
<button onclick="myFunction()">Copy text</button>
JavaScript
function myFunction() {
/* Get the text field */
var copyText = document.getElementById("myInput");
/* Select th… Read More
主页:https://github.com/bgrins/TinyColor
下载 JS :tinycolor.js
TinyColor
JavaScript color tooling
TinyColor is a small, fast library for color manipulation and conversion in JavaScript. It allows many forms of input, while providing color conversions and other color utility functions. It has no dependencies.
用法:
<script type='text/javascript… Read More
直接上代码:
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = ;
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] ==
如果你使用fullcalendar,添加holiday假日的方法如下:
googleCalendarApiKey : 'PUT-YOUR-GOOGLE-API-HERE', // google api key
eventSources: [
{url:'https://www.google.com/calendar/feeds/en.usa#holiday@group.v.calendar.google.com/public/basic',cache:true}, // us holiday
{url:'https://www.google.com/calendar/feeds/zh.china#holiday@grou… Read More
Should be simple, right?
All you want to do is add multiple lines of HTML using JQuery without having to squish everything into one line. So you try something like this:
$("body").append("
<tr>
<td class="text-center">
AprOfficeA
</td>
<td class="text-center">
To read events from your public Google Calendars you’ll need create a Google API key and save within your plugin settings.
Here are step-by-step instructions to create and save a Google API key:
1Navigate to the Google Developers Console.
2 From the top Project menu select Create project.
3Give your project a name, agree to the terms, then click Create.
4…