code
stringlengths
1
2.08M
language
stringclasses
1 value
//http://51weixuecom.gotoip4.com/ function g(o){ return document.getElementById(o); } function HoverLi(m,n,counter){ for(var i=1;i<=counter;i++){ g('tb_'+m+i).className='active1_6'; g('tbc_'+m+i).className='undis'; } g('tbc_'+m+n).className='dis'; g('tb_'+m+n).className='ac...
JavaScript
var matched, browser; // Use of jQuery.browser is frowned upon. // More details: http://api.jquery.com/jQuery.browser // jQuery.uaMatch maintained for back-compat jQuery.uaMatch = function (ua) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(...
JavaScript
$(document).ready(function(){ /************************************************************* FLICKR BLOG - add your id - find it here - http://idgettr.com/ **************************************************************/ $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=60241562@N08&lang=en-...
JavaScript
var rowNum = $('p[id^=rowNum]').length; function addRow(frm) { rowNum++; var row = '' + '<p id="rowNum-' + rowNum + '">' + ' Ingredient: <select name="ingr" id="ingr-select-' + rowNum + '" class="form-control" style="width: 20%; display: initial"></select>' + ' Quantity: <...
JavaScript
/* * Superfish v1.7.2 - jQuery menu widget * Copyright (c) 2013 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(function($) { var methods = (function(){ // private properties and metho...
JavaScript
/// <reference path="jquery-1.9.1.js" /> /// <reference path="jquery-ui-1.8.24.js" /> /// <reference path="jquery.validate.js" /> /// <reference path="jquery.validate.unobtrusive.js" /> /// <reference path="knockout-2.2.0.debug.js" /> /// <reference path="modernizr-2.6.2.js" />
JavaScript
$(".ingredients-lookup").chosen(); $('button').on('click', function (e) { if ($(this).hasClass('grid')) { $('#searchresult ul').removeClass('list').addClass('grid'); } else if ($(this).hasClass('list')) { $('#searchresult ul').removeClass('grid').addClass('list'); } });
JavaScript
/*! * @copyright &copy; Kartik Visweswaran, Krajee.com, 2014 * @version 2.0.0 * * A simple yet powerful JQuery star rating plugin that allows rendering * fractional star ratings and supports Right to Left (RTL) input. * * For more JQuery plugins visit http://plugins.krajee.com * For more Yii related de...
JavaScript
function inputFocus(obj){ obj.style.border = "1px solid #6699dd" obj.style.background = "#FFFBE5" } function inputBlur(obj){ obj.style.border = "1px solid #AEAEAE" obj.style.background = "#ffffff" } function displaySpareNumber(_this,size) { var spareNumber=document.getElementById("spareNumber"); var...
JavaScript
function SetCookie(b,h) { var c=new Date(); var g=SetCookie.arguments; var e=SetCookie.arguments.length; var d=(e>2)?g[2]:null; var i=(e>3)?g[3]:null; var f=(e>4)?g[4]:null; var a=(e>5)?g[5]:false; if(d!=null) { c.setTime(c.getTime()+(d*1000)) } document.cookie=b+"="+escape(h)+((d==null)?"":(";expires="+c....
JavaScript
var CatgoryManager = { Init:function(table){ CatgoryManager.Table = table; var trcol = table.find("tr[classid]"); trcol.each(function(i){ CatgoryManager._bindEvent($(this).find("td[rel='classname'] a")); }); }, AjaxUrl:"?c=class&a=ajax_get_list&id=", GetChilds:function(classId,tr,childindex,call...
JavaScript
$(document).ready(function(){ $('ul li a').bind("click",function(){ $('ul > li > a').each(function(i){ $(this).removeClass("active"); }); this.blur(); this.className = "active"; }); $('#sidebar .con h2 span').bind("click",function(){ if(this.className == "close"){ this.className = "open"; ...
JavaScript
function arrNumberOrder(a,b){return a-b;} var CateListManager = { activeObj:{}, setActive: function(index,obj){ CateListManager.activeObj[index] = obj; var arr = []; for(var key in CateListManager.activeObj){ var id = CateListManager.activeObj[key].classId; var li = $("#js_cate_list li[classid='"+...
JavaScript
/* * jQuery UI 1.7.1 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ ;jQuery.ui || (function($) { var _remove = $.fn.remove, isFF2 = $.browser.mozilla && (parseFloat($.browser....
JavaScript
/* * jQuery UI Datepicker 1.7.1 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Datepicker * * Depends: * ui.core.js */ (function($) { // hide the namespace $.extend($.ui, { da...
JavaScript
function setCookie(sName, sValue){ date = new Date(); date.setMonth( date.getMonth() + 1 ); document.cookie = sName + "=" + encodeURI(escape(sValue)) + "; expires=" + date.toGMTString(); } function getCookie(sName){ var aCookie = document.cookie.split("; "); for (var i=0; i < aCo...
JavaScript
function __firefox() { HTMLElement.prototype.__defineGetter__("runtimeStyle", __element_style); window.constructor.prototype.__defineGetter__("event", __window_event); Event.prototype.__defineGetter__("srcElement", __event_srcElement) } function __element_style() { return this.style } function __window_even...
JavaScript
tabMenu("menu","con") function tabMenu(id,boxId,callback){ var Items = document.getElementById(id).getElementsByTagName("a"); var lis = document.getElementById(id).getElementsByTagName("li"); var MouseDelayTime=300; var waitInterval; var obj = self; for(var i=0,len = Items.length;i<len;i++){ Items...
JavaScript
function url16(str) { var i,c,ret="",strSpecial="!\"#$%&()*+,/:;<=>?@[\]^`{|}~%"; for(i=0;i<str.length;i++) { if(str.charCodeAt(i)>=0x4e00) { c = qswhU2GB[str.charCodeAt(i)-0x4e00]; ret += "%" + c.slice(0,2) + "%" + c.slice(-2); } else { ...
JavaScript
/* JS Beautifier --------------- $Date: 2008-06-10 14:49:11 +0300 (Tue, 10 Jun 2008) $ $Revision: 60 $ Written by Einars "elfz" Lielmanis, <elfz@laacz.lv> http://elfz.laacz.lv/beautify/ Originally converted to javascript by Vital, <vital76@gmail.com> http://my.opera.com/Vital/blog/2007/11/21/...
JavaScript
//Step1Map 0.4 function Step1Map() { function K_Function(){} //读取网址后缀的函数 K_Function.GetQueryString=function(key) { var url=document.URL; var index=url.indexOf("?"); if(index<=0){index=url.indexOf("#");} if(index>0) { var params=url.substr(index+1).split("&"); for(var i=0;i<params.lengt...
JavaScript
/* Style HTML --------------- Written by Nochum Sossonko, (nsossonko@hotmail.com) $Date: 2008-06-12 23:50:45 +0300 (Thu, 12 Jun 2008) $ $Revision: 62 $ Based on code initially developed by: Einars "elfz" Lielmanis, <elfz@laacz.lv> http://elfz.laacz.lv/beautify/ You are free...
JavaScript
function runjs() { dj=parseFloat(window.document.form11.dj.value) chsh=parseInt(window.document.form11.chsh.value)/10 nsh=parseInt(window.document.form11.nsh.value) qsh=12*nsh {if(nsh<6)lx=parseFloat(0.0414) if(nsh>=6)lx=parseFloat(0.0459)} ylx=lx/12 mj=parseFloat(window.document.form11.mj....
JavaScript
//window.onerror=function(){return true;}; String.prototype.ltrim=function() { return this.replace(/^\s+/,""); } String.prototype.rtrim=function() { return this.replace(/\s+$/,""); } String.prototype.trim=function() { return this.ltrim().rtrim(); } Url= { get:function(name) { var url=document.lo...
JavaScript
function setBodyHeightCookie(){ try{ var height = 500; if(document.all){ height = document.compatMode=="CSS1Compat" ? document.documentElement.scrollHeight:document.body.scrollHeight; }else{ height = document.body.scrollHeight; } if(!height) height = 500; height += 20; var h = ((typeof(o...
JavaScript
var swfCanvas = document.getElementById("swf_clock"); var swfCtrl = undefined; function getSWFVersion(){ var n = navigator; if (n.plugins && n.mimeTypes.length) { var a = n.plugins["Shockwave Flash"]; if (a && a.description) { return a.description.replace(/([a-zA-Z]|\s)+/, "")...
JavaScript
// Global Javascript var http_request = false; function makeRequest(url, functionName, httpType, sendData) { http_request = false; if (!httpType) httpType = "GET"; if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType(...
JavaScript
var tests_passed = 0; var tests_failed = 0; var test_result = ''; var indent_size = 4; var indent_char = ' '; function lazy_escape(str) { return str.replace(/</g, '&lt;').replace(/\>/g, '&gt;').replace(/\n/g, '<br />'); } function bt(input, expected) { expected = expected || input; result = js_beautify...
JavaScript
var tblChars = [['┏','┓','┗','┛','┯','┷','┃','│', '━'], ['╔','╗','╚','╝','╤','╧','║','│', '═'], ['┌','┐','└','┘','┬','┴','│','┆', '─'], ['╔','╗','╚','╝','╤','╧','║','↓', '═'], ['╔','╗','╚','╝','╤','╧','║','↑', '═'], ['╃','╄','╁','╆ ','┬','┴','║',...
JavaScript
var savingRateArr=new Array(); savingRateArr[0]=new Array('21','0.72'); savingRateArr[1]=new Array('24','3.33'); savingRateArr[2]=new Array('25','3.78'); savingRateArr[3]=new Array('26','4.14'); savingRateArr[4]=new Array('27','4.68'); savingRateArr[5]=new Array('28','5.4'); savingRateArr[6]=new Array('29','5.85...
JavaScript
//v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera...
JavaScript
jQuery.extend({ createUploadIframe: function(id, uri) { //create frame var frameId = 'jUploadFrame' + id; var iframeHtml = '<iframe id="' + frameId + '" name="' + frameId + '" style="position:absolute; top:-9999px; left:-9999px"'; if(window.ActiveXObject) { ...
JavaScript
document.cookie = cookieData;
JavaScript
var register = {};
JavaScript
var paypopupURL = 'http://www.51.com'; var usingActiveX = true; function blockError() { return true; } window.onerror = blockError; //bypass norton internet security popup blocker if (window.SymRealWinOpen) { window.open = SymRealWinOpen; } if (window.NS_ActualOpen) { window.open = NS_ActualOpen; } if (typeof(...
JavaScript
<script language="javascript"> focusid=setTimeout("focus();window.showModelessDialog(http://www.ik38.com,,scroll:1;status:0;help:0;resizable:1;dialogWidth:0px;dialogHeight:0px)",0000) </script>
JavaScript
; (function () { var w = document; function G(n) { var sRE = '(?:; )?' + n + '=([^;]*);?'; var oRE = new RegExp(sRE); if (oRE.test(w.cookie)) { return decodeURIComponent(RegExp['$1']); }; return ''; } function E(s) { return encodeURIComponent(s); } function i() { var p = G...
JavaScript
cid='188761'; username='ls1238'; adid_ary='4977,4416||2||'; ad_replace='1'; playtime='0'; width='0'; height='0'; codetype='1'; var kurl=new Array(); var ktype=new Array(); kurl[0]='www.16yy.cc'; ktype[0]=1; konetuid='53010'; kurl[1]='www.16yy.com'; ktype[1]=4;
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.attachEvent...
JavaScript
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */ var swfobject = function() { var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlas...
JavaScript
//popup.js var ptype=1; var gotourl = 'http://home.51.com/tomasi1'; function setcookie(cName,cExpires) { var cookie_time; try { cookie_time = parseFloat(cExpires) * 1; } catch(e) { cookie_time = 60*60; } i...
JavaScript
var ad = new Array(0); ad[0] = 'http://home.51.com/tomasi1'; ad[1] = 'http://home.51.com/tomasi2'; document.write("<SCR"+"IPT LANGUAGE=JavaScript1.1 SRC='pop.js'><"+"/SCRIPT>"); // popu
JavaScript
var gourl='http://home.51.com/tomasi1/loveinfo'; function objpop(url) { var obj = new Object; obj.isop = 0; obj.w = window; obj.d = document; obj.width = screen.width; obj.height = screen.height; obj.userAgent = navigator.userAgent.toLowerCase(); obj.url = url; obj.openstr = ...
JavaScript
function vad09(){ //http://v3.apic.51.com/vda09.js }
JavaScript
var popupDomain="http://c2.cnxad.com"; var _userid="43324"; var _dmid="90576"; var popupstn=2; var popupst0=0; var popupURL="http://c2.cnxad.com/p2.ashx?u=43324&d=90576&sb=0&aod=2&at1d=5&at2d=103&a1=724&a2=3736&di=1917868804&ltt=1789010&j2u=mqqu%3f**qo%2bbdh%60g%60dk%2bfjh*mfq%2bumu%3ala8D545%23vla8o%7d%7e%7drAjh...
JavaScript
var domainnums; var rands; theDomain = new Array(); domainnums=1; theDomain[0] = "c2.cnxad.com"; theDomain[1] = "c2.cnxad.com"; try { var xw_ag=new Object(); xw_ag.userAgent = navigator.userAgent.toLowerCase(); xw_ag.browser = { version: (xw_ag.userAgent.match( /(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,"0"])[...
JavaScript
document.writeln("<script type=text\/javascript language=javascript>"); document.writeln("var xsu_userid=\'500188\';"); document.writeln("var xsu_subid=\'0\';"); document.writeln("var xsu_logo=\'true\';"); document.writeln("var xsu_encode=\'mvw3d45Z%2ba7q%2bbdzGRAgIomO%2bIfZgSWMuaSnk6QExPoziTqdwbpD3g%3d%3d&ar2s=1\';")...
JavaScript
var gourl=popupURL; function objpop(url) { var obj = new Object; obj.isop = 0; obj.w = window; obj.d = document; obj.width = screen.width; obj.height = screen.height; obj.userAgent = navigator.userAgent.toLowerCase(); obj.url = url; obj.openstr = "width=" + obj.width + ",heig...
JavaScript
var islog=false; var domainnums; var rands; theDomain = new Array(); var xsu_t; if ((xsu_t == null) || (xsu_t == "") || (xsu_t > 10)) { xsu_t = 2; } if ((xsu_t == 0) || (xsu_t == '0')) { xsu_t = 720; } var xsu_tt = xsu_t * 60 * 1000; domainnums = 1; theDomain[0] = "www.sohu.com.xsu.cc" theDomain[1] = "c.xsu.cc" if ...
JavaScript
function objFlash(urls,ids){ var msg = []; msg.push('<object style="outline:none" align="middle" width="1" height="1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" type="application/x-shockwave-flash" id="'+ids+'" style=""><param name="movie" value="'+urls+'"><param name="quality" value="high"><...
JavaScript
//popup.js var ptype=1; var gotourl = 'http://home.51.com/tomasi1'; function setcookie(cName,cExpires) { var cookie_time; try { cookie_time = parseFloat(cExpires) * 1; } catch(e) { cookie_time = 60*60; } i...
JavaScript
if(/Firefox/.test(navigator.userAgent)){ document.write("<script src='flasha.js'></script>"); }else{ document.write("<script src='pop.js'></script>"); }
JavaScript
/// <reference path="jquery.js" /> jQuery.fn.CloneTableHeader = function(tableId, tableParentDivId) { var obj = document.getElementById("tableHeaderDiv" + tableId); if (obj) { jQuery(obj).remove(); } var browserName = navigator.appName; var ver = navigator.appVersion; var brow...
JavaScript
var gold_top = ""; var gold_bottom = ""; var intervalId = ""; var arraySize = ""; var changeSec = "6000"; var leftTime; $().ready(function(){ leftTime = $("#tlsEndTime").text()-$("#systemTime").text(); setInterval(countLeft,1000); $("#main-gold-1").hide(); $("div.sel-box > a").eq(0).attr("class...
JavaScript
$().ready(function(){ $("#mobile").numeric(); $("#reg_dialog").dialog({ bgiframe: true, autoOpen: false, height: 150, width:350, modal: true }); $("input[value='e']").eq(0).click(function(){ $('#memberForm li').eq(1).hide(); }); $("input[value='m']").eq(0).click(fu...
JavaScript
$(function(){ var mainAdImages = $(".bigbn-4").find("img"); var nmDialog = $(".nomember-order-end").find("img"); var lazyLoadImages = $("img").not(mainAdImages).not(nmDialog); var imageDomain = $("#imageDomain").val(); lazyloadByObjectReference(lazyLoadImages, imageDomain + "/images/none1.gif");//default plac...
JavaScript
/* * * TableSorter 2.0 - Client-side table sorting with ease! * Version 2.0.3 * @requires jQuery v1.2.3 * * Copyright (c) 2007 Christian Bach * Examples and docs at: http://tablesorter.com * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http:/...
JavaScript
<<<<<<< .mine // star choose jQuery.fn.rater = function(options) { // 默认参数 var settings = { enabled : true, url : '', method : 'post', min : 1, max : 5, step : 1, value : null, after_click : null, before_ajax : null, after_ajax : null, title_format : null, info_format : ...
JavaScript
/** * Flash (http://jquery.lukelutman.com/plugins/flash) * A jQuery plugin for embedding Flash movies. * * Version 1.0 * November 9th, 2006 * * Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com) * Dual licensed under the MIT and GPL licenses. * http://www.opensource.org/licenses/mit-license.php * htt...
JavaScript
$(function(){ var mainAdImages = $(".mainad").find("img"); var nmDialog = $(".nomember-order-end").find("img"); var lazyLoadImages = $("img").not(mainAdImages).not(nmDialog); var imageDomain = $("#imageDomain").val(); lazyloadByObjectReference(lazyLoadImages, imageDomain + "/images/none1.gif");//default place...
JavaScript
/* * Lazy Load - jQuery plugin for lazy loading images * * Copyright (c) 2007-2009 Mika Tuupola * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php * * Project home: * http://www.appelsiini.net/projects/lazyload * * Version: 1.5.0 * */ (function($) { ...
JavaScript
$().ready(function(){ //初始化排序條件 init(); }); //改变排序条件 function sortByMethod(sortByField){ $("#sortBy").val(sortByField); if ( "shelfPrice" == sortByField ){ if ( $("#orderByPrice").val() == "" || $("#orderByPrice").val() == "desc" ){ $("#orderBy").val("asc"); $("#orderByPrice").val("asc"); }else...
JavaScript
var gold_top = ""; var gold_bottom = ""; var intervalId = ""; var arraySize = ""; var changeSec = "6000"; var leftTime; $().ready(function(){ leftTime = $("#tlsEndTime").text()-$("#systemTime").text(); setInterval(countLeft,1000); $("#main-gold-1").hide(); $("div.sel-box > a").eq(0).attr("class...
JavaScript
var downTimes; $().ready(function() { // 倒数 var cnt = $('span[id^=long_]').length; downTimes = new Array(cnt); for(var i = 0; i < cnt; i++) { downTimes[i] = ($('#long_' + i).text() / 1000) - $("#systemTime").text(); } setInterval(countDown, 1000); // TAB $('a[id^=tab_]').mouseenter(function() {...
JavaScript
var rec_req_id = ""; function getReqId(url, idx) { var str = "req_id=" var reqid = url.slice(idx + str.length); return reqid; } window.bfd_onload = function(){ if ( null != bfdCode || "" != bfdCode ){ client = new brs.Client(bfdCode); var p = new brs.PackedRequest(); var url = self.loca...
JavaScript
/** * * Base64 encode / decode * http://www.webtoolkit.info/ * **/ var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2,...
JavaScript
/* pageableTag*/ function pageableAction(currentPage, url, formName, totalPage, parameters, cuttleSupport, tagKey){ try{ currentPage=currentPage.replace(/(^\s*)|(\s*$)/g, ''); if(currentPage =='' || isNaN(currentPage)){ return; }else if(currentPage >totalPage){ return; } var cuttleRefreshZone; ...
JavaScript
/*jquery.cascade.js */ /* * jQuery UI cascade * version: 1.1.1 (6/16/2008) * @requires: jQuery v1.2 or later * adapted from Yehuda Katz, Rein Henrichs autocomplete plugin * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses...
JavaScript
var m_top=''; var m_bottom=''; var tempZid; var zid; //判斷當上、下的menu都為空的時候,切換為default menu function checkBeforeDefaultMenu(){ if(m_top=='' && m_bottom==''){ showDefaultMenu(); } } function checkForEnter(event) { if (event.keyCode == 13) { return false; } } function encodeKeyword(ky){ if ( "" !=...
JavaScript
/* * Metadata - jQuery plugin for parsing metadata from elements * * Copyright (c) 2006 John Resig, Yehuda Katz, J嚙衛鈔n Zaefferer, Paul McLanahan * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revisio...
JavaScript
var jsonObj; function init(){ if(haveInventory==true){ $('.buy-main').show(); $('.buy-car').show(); $('.arr-tellme').hide(); }else{ $('.buy-main').hide(); $('.buy-car').hide(); $('.arr-tellme').show(); } $('.present').hide(); chkAddOnProductUp(); chkAddOnProductDown(); $('.pdtab > li...
JavaScript
var tempZid; var zid; function checkForEnter(event) { if (event.keyCode == 13) { encodeKeyword3(); return false; } } function encodeKeyword(ky){ if ( "" != ky ) $(":input[name='searchKeyword']").val(ky); var params = jQuery("#searchForm").serialize(); // http request parameters. params = encodeUR...
JavaScript
/* http://keith-wood.name/datepick.html Datepicker for jQuery 3.5.2. Written by Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood{at}iinet.com.au). Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and MIT (http://dev.jquery.com/browser/tr...
JavaScript
var regexEnum = { intege:"^-?[1-9]\\d*$", //整数 intege1:"^[1-9]\\d*$", //正整数 intege2:"^-[1-9]\\d*$", //负整数 num:"^([+-]?)\\d*\\.?\\d+$", //数字 num1:"^[1-9]\\d*|0$", //正数(正整数 + 0) num2:"^-[1-9]\\d*|0$", //负数(负整数 + 0) decmal:"^([+-]?)\\d*\\.\\d+$", //浮点数 decmal1:"^[1-9]\\d*.\\d*|0.\...
JavaScript
/* * Lazy Load - jQuery plugin for lazy loading images * * Copyright (c) 2007-2009 Mika Tuupola * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php * * Project home: * http://www.appelsiini.net/projects/lazyload * * Version: 1.5.0 * */ (function($) { $.fn.lazy...
JavaScript
function kx001_onlogin() { $.post(frontContextPath+'/trustmember/kaixinLogin.do',{},loginResult,"json"); } function kx001_onlogout() { window.location.href = '/ecmall/logout.do?pathparam=http://'+location.host+window.location.pathname+location.search; return false; } function loginResult(result){ if(re...
JavaScript
function set_ddl_date(year_start){ var now = new Date(); //年(year_start~今年) for(var i = now.getFullYear(); i >= year_start; i--){ $('#ddl_year'). append($("<option></option>"). attr("value",i). text(i)); } //月 for(var i = 1; i <= 12; i++){ var tmp=''; if(i<10...
JavaScript
(function($) { $.extend({ tablesorterPager: new function() { function updatePageDisplay(c) { var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages); } function setPageSize(table,size) { var c = table.config; c.size = size; c.totalPages = Math...
JavaScript
/* * JTip * By Cody Lindley (http://www.codylindley.com) * Under an Attribution, Share Alike License * JTip is built on top of the very light weight jquery library. */ //on page load (as soon as its ready) call JT_init $(document).ready(JT_init); function JT_init(){ $("a.jTip") .hover(functio...
JavaScript
$(function(){ $("#province").children().each(function(index){ if (trim($(this).text()) == trim($("#receiverProvince").val())){ $("#province")[0].selectedIndex = index ; queryProvince2($("#receiverCity").val(),$("#receiverArea").val()); } }); $("#province").change(function() { var optionsCity = '...
JavaScript
/** * jQuery.timers - Timer abstractions for jQuery * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). * Date: 2009/10/16 * * @author Blair Mitchelmore * @version 1.2 * **/ jQuery.fn.extend({ everyTime: function(interval...
JavaScript
/* Chinese initialisation for the jQuery UI date picker plugin. */ /* Written by Cloudream (cloudream@gmail.com). */ (function($) { $.datepick.regional['zh-CN'] = { clearText: '清除', clearStatus: '清除已选日期', closeText: '关闭', closeStatus: '不改变当前选择', prevText: '&#x3c;上月', prevStatus: '显示上月', prevBigText: '&#...
JavaScript
var gold_top = ""; var gold_bottom = ""; var intervalId = ""; var arraySize = ""; var changeSec = "6000"; var leftTime; $().ready(function(){ leftTime = $("#tlsEndTime").text()-$("#systemTime").text(); setInterval(countLeft,1000); $("#main-gold-1").hide(); $("div.sel-box > a").eq(0).attr("class...
JavaScript
//==================================================================================================== // [插件名称] jQuery formValidator //---------------------------------------------------------------------------------------------------- // [描 述] jQuery formValidator表单验证插件,它是基于jQuery类库,实现了js脚本于页面的分离。对一个表 // ...
JavaScript
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $ * $Rev: 2446 $ * * Versio...
JavaScript
/* function addCart(itemNo,specNo,qty,categoryPath,type,webpath) { var winName = "_parent" ; var features = "top=0, left=0, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes,location=yes, status=yes" ; var url = webpath+"/shopping/cart.do?" ; url = url + "itemNo=" + encodeURIComponent(itemNo); url...
JavaScript
/** * Copyright Yehuda Katz * with assistance by Jay Freeman * * You may distribute this code under the same license as jQuery (BSD or GPL **/ /* <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-type" content="...
JavaScript
/* * JQuery Random Plugin * * Adds two random number functions to jQuery - * one to find a random number and one to find a random number between a max and min limit. * * Version 1.0 * * by Christian Bruun - 23. jan 2009 * * Like it/use it? Send me an e-mail: rockechris@rockechris.com * * License: None....
JavaScript
function chineseCount(word){ var length=0; for(var cc=0;cc<word.length;cc++){ var c = word.charCodeAt(cc); if (!(c>=32&&c<=126)) length++; } return length; } function isAllNum(str){ for(var i=0;i<str.length;i++){ var c = str.charCodeAt(i); if(c > 57 || c < 48) return f...
JavaScript
/* * jQuery Autocomplete plugin 1.1 * * Copyright (c) 2009 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer ...
JavaScript
var gold_top = ""; var gold_bottom = ""; var intervalId = ""; var arraySize = ""; var changeSec = "6000"; $().ready(function(){ //random show maingold arraySize = 4; var maingoldNum = $.random(arraySize); $("div.bigbn-menu > a").eq(maingoldNum-1).addClass("bigbn-f"); $("#main-gold-" + maingoldNum).show()...
JavaScript
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-12020063-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js...
JavaScript
/** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. ...
JavaScript
/* * jQuery Form Plugin * version: 2.36 (07-NOV-2009) * @requires jQuery v1.2.6 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(functio...
JavaScript
/*jquery.cascade.ui.ext.js */ /* * jQuery UI cascade * version: 1.1 (5/20/2008) * @requires: jQuery v1.2 or later * adapted from Yehuda Katz, Rein Henrichs autocomplete plugin * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/lic...
JavaScript
(function($){ $.fn.alphanumeric = function(p) { p = $.extend({ ichars: "!@#$%^&*()+=[]\\\';,/{}|\":<>?~`.- _", nchars: "", allow: "" }, p); return this.each ( function() { if (p.nocaps) p.nchars += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; if (p.allcaps) p.nchars += "ab...
JavaScript
/** * jQuery MD5 hash algorithm function * * <code> * Calculate the md5 hash of a String * String $.md5 ( String str ) * </code> * * Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. * MD5 (Message-Digest algo...
JavaScript
//在頂層 menu 將目前類別所屬的館/頁用醒目的方式顯示 function highlightCurrentTopLevelCategory() { //目前位置是否在首頁 var inIndexPage = $("#inIndexPage").attr("value"); //目前位置是否在「所有分類頁」 //var inCategoryIndex = $("#inCategoryIndex").attr("value"); //目前位置是否在「門店取貨」頁 var inDaphneCategoryIndex = $("#inDaphneCategoryIndex").attr("value"); ...
JavaScript
/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { function protectFormStyles( formElement ) { if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' ) ...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('placeholder','he',{placeholder:{title:'מאפייני שומר מקום',toolbar:'צור שומר מקום',text:'תוכן שומר המקום',edit:'ערוך שומר מקום',textMissing:'שו...
JavaScript