code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/**
* Creates a new Floor.
* @constructor
* @param {google.maps.Map=} opt_map
*/
function Floor(opt_map) {
/**
* @type Array.<google.maps.MVCObject>
*/
this.overlays_ = [];
/**
* @type boolean
*/
this.shown_ = true;
if (opt_map) {
this.setMap(opt_map);
}
}
/**
* @param {google.maps.M... | JavaScript |
/**
* Creates a new level control.
* @constructor
* @param {IoMap} iomap the IO map controller.
* @param {Array.<string>} levels the levels to create switchers for.
*/
function LevelControl(iomap, levels) {
var that = this;
this.iomap_ = iomap;
this.el_ = this.initDom_(levels);
google.maps.event.addList... | JavaScript |
/**
* @license
*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | JavaScript |
// Copyright 2011 Google
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* !WARNING! IT'S NOT A FREEWERE.
*/
/*
* Func:Login
*/
function Login()
{
$("#mainBox").innerHTML = "<div id=LoginBox'' name='LoginBox' class='LoginBox' ></div>";
$.get({
url: "./template/load.php?html=L... | JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* !WARNING! IT'S NOT A FREEWERE.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* !WARNING! IT'S NOT A FREEWERE.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* !WARNING! IT'S NOT A FREEWERE.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* !WARNING! IT'S NOT A FREEWERE.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
var hexcase = 0;
var chrsz = 8;
function hex_md5(s){
return binl2hex(core_md5(str2binl(s), s.length * chrsz));
}
function core_md5(x, len) {
x[len >> 5] |= 0x80 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] =... | JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
| JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
* !WARNING! IT'S NOT A FREEWERE.
*/
| JavaScript |
/*!
* jQuery JavaScript Library v1.5.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL... | JavaScript |
/**
* 用于签证Web系统的附加js
* added by zhouhuan, 2012-09-26
*/
// 用于iframe加载表格页面,进行loading提示
$().ready(function() {
$(window.parent.document).find("#form_frame").load(function() {
$(this).height($(this).contents().height());
parent.loading.hide();
});
$("#printInfo").hide();
});
functio... | JavaScript |
(function($){
$.fn.autoMail = function(options){
var autoMail = $(this);
var _value = '';
var _index = -1;
var _width = autoMail.outerWidth();
var _height = autoMail.outerHeight();
var _left = autoMail.offset().left;
var _top = autoMail.o... | JavaScript |
/*
* Translated default messages for the jQuery validation plugin.
* Locale: CN
*/
jQuery.extend(jQuery.validator.messages, {
required: "必选字段",
remote: "请修正该字段",
email: "请输入正确格式的电子邮件",
url: "请输入合法的网址",
date: "请输入合法的日期",
dateISO: "请输入合法的日期 (ISO).",
number: "请输入合法的数字",
digits: "只能输入整数",
creditc... | JavaScript |
function do_login() {
if($("#uid").val()=="" || $("#pwd").val()=="") {
alert("请输入用户名及登录密码!");
return false;
}
if($("#ac").val()=="") {
alert("请输入登录验证码!");
return false;
}
$("#btnLogin").val("验证中...");
$("#btnLo... | JavaScript |
/*
http://www.JSON.org/json2.js
2011-02-23
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE... | JavaScript |
function disableTextFields(form, combo) {
for (var i = 0; i < document.forms[form].elements.length; i++) {
var currentType = document.forms[form].elements[i].type;
//alert(currentType);
if (currentType == 'text') {
document.forms[form].elements[i].disabled = true;
}
... | JavaScript |
function disableTextFields(form, combo) {
for (var i = 0; i < document.forms[form].elements.length; i++) {
var currentType = document.forms[form].elements[i].type;
//alert(currentType);
if (currentType == 'text') {
document.forms[form].elements[i].disabled = true;
}
... | JavaScript |
/**
* Proj1_1 This JavaScript file is for Canvas view.
*/
//constants
// do not change.......plz
PAGE_ID_HOME = 0;
PAGE_ID_FRIENDS = 1;
PAGE_ID_TWITTER = 2;
PAGE_ID_NEWS = 3;
PAGE_ID_ERRORS = 4;
// variables
// to show error messages or to accumulate them in error box
var showAlert = true;
// tab view ... | JavaScript |
/**
* PaginationTest This JavaScript file is for Canvas view.
*/
// maintain a count
var count = 0;
var showAlert = false; // control to enable or disable the alert boxes
var start = 0;
var limit = 2;
var page = 1;
var arrFriends = []; // array of friends to be invited
var viewerName = ''; // name of view... | JavaScript |
/**
* TestOpenSocial This JavaScript file is for Canvas view.
*/
// maintain a count
var count = 0;
var start = 0;
var limit = 50;
var page = 1;
var arrFriends = []; // array of friends to be invited
var viewerName = ''; // name of viewer
function init() {
// TODO: Write the code for initializing... | JavaScript |
//db.js
// YQL
var q1 = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D%22http%3A%2F%2Febox.mcs.csueastbay.edu%3A8080%2Fcs12618%2Fproj1%2Ftwiface%3Fid%3D";
var q2 = "%26getscrname%3Dgetscrname%22%20&format=json&diagnostics=true&callback=";
// insertion query
var qIns1 = "htt... | JavaScript |
// News fetching YQL query
var szNewsFeed = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22%20&format=json&diagnostics=true";
// number of feed items to show.
var nFeedItemsToShow = 5;
// get news feed and add it into g... | JavaScript |
/**
* Proj1.0.1
* This JavaScript file is for Canvas view.
*/
// variables
// to show error messages or to accumulate them in error box
var showAlert = false;
// tab view tab control.
var myTabs;
// limit # friends per page
var limit = 10; // must match min option in pagesize combo
// current page #
var ... | JavaScript |
// Tweets fetching Query
var szURLTweet1 = "https://query.yahooapis.com/v1/public/yql?q=select%20status.text%2Cstatus.created_at%2Cstatus.user.screen_name%20from%20twitter.user.timeline%20where%20screen_name%3D'";
var szURLTweet2 = "'&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";... | JavaScript |
//db.js
// YQL
var q1 = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D%22http%3A%2F%2Febox.mcs.csueastbay.edu%3A8080%2Fcs12618%2Fproj1%2Ftwiface%3Fid%3D";
var q2 = "%26getscrname%3Dgetscrname%22%20&format=json&diagnostics=true&callback=";
// insertion query
var qIns1 = "htt... | JavaScript |
// News fetching YQL query
var szNewsFeed = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22%20&format=json&diagnostics=true";
// number of feed items to show.
var nFeedItemsToShow = 5;
// get news feed and add it into g... | JavaScript |
/**
* Proj1.0.1
* This JavaScript file is for Canvas view.
*/
// variables
// to show error messages or to accumulate them in error box
var showAlert = false;
// tab view tab control.
var myTabs;
// limit # friends per page
var limit = 10; // must match min option in pagesize combo
// current page #
var ... | JavaScript |
// Tweets fetching Query
var szURLTweet1 = "http://query.yahooapis.com/v1/public/yql?q=select%20status.text%2C%20status.created_at%2C%20status.user.screen_name%20from%20twitter.user.timeline%20where%20screen_name%3D'";
var szURLTweet2 = "'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=";
... | JavaScript |
/**
* Proj1.0.1
* This JavaScript file is for Canvas view.
*/
//constants
// do not change.......plz
PAGE_ID_HOME = 0;
PAGE_ID_FRIENDS = 1;
PAGE_ID_TWITTER = 2;
PAGE_ID_NEWS = 3;
PAGE_ID_ERRORS = 4;
// variables
// to show error messages or to accumulate them in error box
var showAlert = false; // thi... | JavaScript |
// Tweets fetching Query
var szURLTweet1 = "https://query.yahooapis.com/v1/public/yql?q=select%20status.text%2Cstatus.created_at%2Cstatus.user.screen_name%20from%20twitter.user.timeline%20where%20screen_name%3D'";
var szURLTweet2 = "'&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";... | JavaScript |
// News fetching YQL query
var szNewsFeed = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22%20&format=json&diagnostics=true";
// number of feed items to show.
var nFeedItemsToShow = 5;
// get news feed and add it into g... | JavaScript |
// News fetching YQL query
var szNewsFeed = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22%20&format=json&diagnostics=true";
var feedCount = 0;
// same method, but using gadgets.io.makerequest
function readNewsURL(szUR... | JavaScript |
/**
* Proj1.0.1
* This JavaScript file is for Canvas view.
*/
//constants
// do not change.......plz
PAGE_ID_HOME = 0;
PAGE_ID_FRIENDS = 1;
PAGE_ID_TWITTER = 2;
PAGE_ID_NEWS = 3;
PAGE_ID_ERRORS = 4;
// variables
// to show error messages or to accumulate them in error box
var showAlert = false;
// ta... | JavaScript |
// Twits fetching Query
var szURLTwit1 = "https://query.yahooapis.com/v1/public/yql?q=select%20status.text%2Cstatus.created_at%2Cstatus.user.screen_name%20from%20twitter.user.timeline%20where%20screen_name%3D'";
var szURLTwit2 = "'&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&call... | JavaScript |
//db.js
// YQL
var q1 = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D%22http%3A%2F%2Febox.mcs.csueastbay.edu%3A8080%2Fcs12618%2Fproj1%2Ftwiface%3Fid%3D";
var q2 = "%26getscrname%3Dgetscrname%22%20&format=json&diagnostics=true&callback=";
// insertion query
var qIns1 = "htt... | JavaScript |
// News fetching YQL query
var szNewsFeed = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22%20&format=json&diagnostics=true";
// number of feed items to show.
var nFeedItemsToShow = 5;
// get news feed and add it into g... | JavaScript |
/**
* Proj1.0.1
* This JavaScript file is for Canvas view.
*/
// variables
// to show error messages or to accumulate them in error box
var showAlert = false;
// tab view tab control.
var myTabs;
// limit # friends per page
var limit = 10; // must match min option in pagesize combo
// current page #
var ... | JavaScript |
// Tweets fetching Query
var szURLTweet1 = "https://query.yahooapis.com/v1/public/yql?q=select%20status.text%2Cstatus.created_at%2Cstatus.user.screen_name%20from%20twitter.user.timeline%20where%20screen_name%3D'";
var szURLTweet2 = "'&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
// A modified version of bitmap.js from http://rest-term.com/archives/2566/
var Class = {
create : function() {
var properties = arguments[0];
function self() {
this.initialize.apply(this, arguments);
}
for(var i in properties) {
self.prototype[i] = properties[i];
}
if(!self.proto... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
Base.js, version 1.1
Copyright 2006-2007, Dean Edwards
License: http://www.opensource.org/licenses/mit-license.php
*/
var Base = function() {
// dummy
};
Base.extend = function(_instance, _static) { // subclass
var extend = Base.prototype.extend;
// build the prototype
Base._prototyping = true;
var proto... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | JavaScript |
/*
* QUnit - A JavaScript Unit Testing Framework
*
* http://docs.jquery.com/QUnit
*
* Copyright (c) 2009 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*/
(function(window) {
var QUnit = {
// Initialize the configuration options
init: funct... | JavaScript |
/**
JSZip - A Javascript class for generating Zip files
<http://jszip.stuartk.co.uk>
(c) 2009 Stuart Knightley <stuart [at] stuartk.co.uk>
Licenced under the GPLv3 and the MIT licences
Usage:
zip = new JSZip();
zip.add("hello.txt", "Hello, World!").add("tempfile", "nothing");
zip.folder("images").add("smile... | JavaScript |
/*
* Port of a script by Masanao Izumo.
*
* Only changes : wrap all the variables in a function and add the
* main function to JSZip (DEFLATE compression method).
* Everything else was written by M. Izumo.
*
* Original code can be found here: http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt
*... | JavaScript |
/*
Downloadify: Client Side File Creation
JavaScript + Flash Library
Version: 0.2
Copyright (c) 2009 Douglas C. Neiner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without res... | JavaScript |
/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* @link http://www.phpied.com/rgb-color-parser-in-javascript/
* @license Use it if you like it
*/
function RGBColor(color_string)
{
this.ok = false;
// strip any leading #
if (color_string.charAt(0) == '#') { ... | JavaScript |
/*
* canvg.js - Javascript SVG parser and renderer on Canvas
* MIT Licensed
* Gabe Lerner (gabelerner@gmail.com)
* http://code.google.com/p/canvg/
*
* Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
*/
if(!window.console) {
window.console = {};
window.console.log = func... | JavaScript |
/**
*
* Color picker
* Author: Stefan Petre www.eyecon.ro
*
* Dual licensed under the MIT and GPL licenses
*
*/
(function ($) {
var ColorPicker = function () {
var
ids = {},
inAction,
charMin = 65,
visible,
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><di... | JavaScript |
// A partir de un formulario, generar los resultados y la ponderación.
// Rango difuso en el rango [0,10]
function rangoDifuso (x0,x1,x2,x3) {
this.x = new Array(x0, x1, x2, x3);
};
// Para la inversion.
rangoDifuso.prototype.infinito = 10;
// this = this + other.
rangoDifuso.prototype.sumar = function(other) {
fo... | JavaScript |
// Objetos svg como elmentos html.
function svgCanvas(name, id, height, width) {
this.tag = document.getElementById(id);
if (this.tag == undefined)
this.tag = document.createElementNS('http://www.w3.org/2000/svg','svg');
this.tag.setAttribute('name',name);
this.tag.setAttribute('id',id);
this.tag.setAttribute(... | JavaScript |
// Funciones de utilidad para el marco de navegación.
function loadFrame(button) {
iframe = document.getElementById('formFrame');
if (!button.classList.contains('selected')) {
iframe.src = button.value;
botones = document.getElementsByTagName('button');
for (var i=0; i<botones.length; i++)
botones[i].class... | JavaScript |
// 定义heart类
function Heart(){
this.init();
}
// 定义heart类的draw函数
Heart.prototype={
init:function(){
Heart.finished = false;
},
calPositon:function(startx, starty, radius, addArch, garden){
// 初始化弧度系数,0-2
var startArch = 0;
// 执行定时计算,frequency是刷新频率
var a = setInterval(function() {
// 计算出的当前心形坐标
var ... | JavaScript |
var $window = $(window)
var clientWidth = $(window).width();
var clientHeight = $(window).height();
$(window).resize(function() {
var b = $(window).width();
var a = $(window).height();
if (b != clientWidth && a != clientHeight) {
location.replace(location)
}
});
// 初始化时候做的
$(function() {
drawLoveHeartLeft();... | JavaScript |
function Vector(a, b) {
this.x = a;
this.y = b
}
Vector.prototype = {
rotate: function(b) {
var a = this.x;
var c = this.y;
this.x = Math.cos(b) * a - Math.sin(b) * c;
this.y = Math.sin(b) * a + Math.cos(b) * c;
return this
},
mult: function(a) {
this.x *= a;
this.y *= a;
return this
},
clone: fu... | JavaScript |
<script type="text/javascript">
if ($.cookie("username") != null && $.cookie("username") != "") {
$("#j_username").val($.cookie("username"));
$("#j_password").focus();
} else {
$("#j_username").focus();
}
function saveUsername(theForm) {
$.cookie("username",theForm.j... | JavaScript |
// This function is used by the login screen to validate user/pass
// are entered.
function validateRequired(form) {
var bValid = true;
var focusField = null;
var i = 0;
var fields = new Array();
oRequired = new required();
for (x in oRequired) {
if ((form[oRequired[x][0]].type == 'tex... | JavaScript |
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | JavaScript |
/*******************************************************************************
* Copyright (c) 2009, 2012 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | JavaScript |
/*
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | JavaScript |
if(typeof(popwin)=='undefined'){
document.write('<script type="text/javascript" src="js/popwin.js"></script>');
}
function showBBSGuide(){
popwin.showURL('论坛今日导读','plugins/bbsguide/index.php',590,470);
}
try{
setTimeout(
function(){
if(getCookie("lastreadbbsguide")==""){
showBBSGuide();
set... | JavaScript |
function scrollup(o,d,c){
if(d==c){
var t=o.firstChild.cloneNode(true);
o.removeChild(o.firstChild);
o.appendChild(t);
t.style.marginTop=o.firstChild.style.marginTop='0px';
}
else{
var s=1,c=c+s,l=(c>=d?c-d:0);
... | JavaScript |
function addFans(userid){
popwin.loading();
ajaxGet("ajaxmember.php?action=addFans&touserid="+userid, addFans_callback);
}
function addFans_callback(data){
var btns=[{value:" 确 定 ",onclick:"popwin.close();self.location.reload();",focus:true}];
popwin.loaded();
if(data=="y"){
popwin.showDialog(1,"操作成功","您... | JavaScript |
function email_checkAllAction(){
var btns=[{value:" 确 定 ",onclick:"popwin.close();",focus:true}];
var eu = trim(E("username").value);
if(eu==""){
popwin.showDialog(2,"操作提示","请填写用户名。", btns, 280, 130);
return;
}
var ev = trim(E("email").value);
if(!isEmail(ev)){
popwin.showDialog(2,"操作提示","电子邮箱格式不正确... | JavaScript |
if(typeof vLangue == 'undefined')
vLangue = 1
if(typeof vWeekManagement == 'undefined')
vWeekManagement = 1
var fixedX = -1 // x position (-1 if to appear below control)
var fixedY = -1 // y position (-1 if to appear below control)
var startAt = parseFloat(vWeekManagement) // 0 - ... | JavaScript |
function postManager(actionindex, tid, postid){
var actions=["", "delPost", "movePost", "coverPost", "lockPost", "topPost", "alltopPost", "goodPost", "onoffPost", "upPost", "stampPost", "highlightPost"];
var action=actions[actionindex];
switch(action){
case "delPost":
popwin.showURL('删除帖子','postmanager... | JavaScript |
var strengthStr_Arr=["弱", "中", "强"];
function CharMode(iN)
{
if ( iN>=48 && iN<=57 )
{
return 1;
}
if ( iN>=65 && iN<=90 )
{
return 2;
}
if ( iN>=97 && iN<=122 )
{
return 4;
}
else
{
return 8;
}
}
function bitTotal(num)
{
modes = 0;
for ( i=0; i<4; i++ )
{... | JavaScript |
//弹出窗口类popwin
function E(elementid)
{
var obj;
try
{
obj = document.getElementById(elementid);
}
catch (err)
{
alert(elementid+" NOT Found!");
}
return obj;
}
function setDisplays(es,s){
for(var n=0;n<es.length;n++){
if(E(es[n])){
E(es[n]).style.display = ((s[n])?"":"none");
}
... | JavaScript |
var strengthStr_Arr=["弱", "中", "强"];
function CharMode(iN)
{
if ( iN>=48 && iN<=57 )
{
return 1;
}
if ( iN>=65 && iN<=90 )
{
return 2;
}
if ( iN>=97 && iN<=122 )
{
return 4;
}
else
{
return 8;
}
}
function bitTotal(num)
{
modes = 0;
for ( i=0; i<4; i++ )
{... | JavaScript |
function login_checkAllAction(){
if(getV("username")==""||getV("userpass")==""){
E("input_err").innerHTML = "<span class='errStyle'>请填写用户名和密码</span>";
return false;
}
return true;
}
function login_PageInit(){
E("username").focus();
} | JavaScript |
function sendUserMsg(username){
popwin.showURL('写新短信','viewmsg.php?action=send&username='+username,560,300)
} | JavaScript |
function search(){
window.location.href = "search.php?action=search&k="+urlEncode(E("keyword").value)+"&fid="+getMultipleValue(E("fid"))+"&area="+E("area").value+"&topictypestr="+getRadioValue("topictypestr")+"&topicspc="+getRadioValue("topicspc")+"&starttime="+E("starttime").value+"&stoptime="+E("stoptime").value;
... | JavaScript |
var hasErr = false;
var hasUserCallback=false;
var hasEmailCallback=false;
var hasVerifyCallback=false;
function checkUsername(){
var v = trim(E("username").value);
if(v==""||getLength(v)<4||getLength(v)>16){
hasErr = true;
E("username_tips").innerHTML = "<span class='errStyle'>长度必须为:4-16位字符(中文8个)</spa... | JavaScript |
function correctPNG()
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "c... | JavaScript |
function E(elementid)
{
var obj;
try
{
obj = document.getElementById(elementid);
}
catch (err)
{
alert(elementid+" NOT Found!","System");
}
return obj;
}
function getE(elementid){
return E(elementid);
}
function setDisplays(es,s){
for(var n=0;n<es.length;n++){
if(E(es[n])){
E(es[... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.