黑夜的狼

沮丧吗,那就是一种无病呻吟!留恋它就是一种高度近视!目光应该放得更远一点! 别不想飞,只是要一步跨过太平洋!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

文章分类 -  js

1 2 下一页

js脚本
摘要:JS,Jquery获取屏幕的宽度和高度 Javascript: 网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeight 网页可见区域宽: document.body.offsetWidth (包括边线的宽) 网页可 阅读全文
posted @ 2019-07-04 11:37 anncesky 阅读(362) 评论(0) 推荐(0)

摘要:readonly=true //只读 对外设无效UNSELECTABLE=on //不可编辑 对外设无效onkeydown=function(){return false}CONTENTEDITABLE=false //无法选中 对外设有效DISABLED=true //无效 对外设有效以上方法对脚本全部无效 阅读全文
posted @ 2012-08-11 11:35 anncesky 阅读(321) 评论(0) 推荐(0)

摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>div + css宽度自适应(液态布局)</title> <style type="text/css&quo 阅读全文
posted @ 2012-08-10 20:36 anncesky 阅读(11498) 评论(0) 推荐(0)

摘要:scrollHeight: 获取对象的滚动高度,对象的实际高度;scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离scrollWidth:获取对象的滚动宽度offsetHeight:获取对象相对由父坐标 offsetParent 属性指定的父坐标的高度offsetLeft:获取当前对象到其上级层左边的距离.offsetTop:获取当前对象到其上级层顶部的距离.event.clientX 相对文档的水平座标event.clientY 相对文档的垂直座标event.offsetX 相对容 阅读全文
posted @ 2012-07-15 16:22 anncesky 阅读(283) 评论(0) 推荐(0)

摘要:因为easyui的分页条比较死板,所以只能自己写个简单的,不过够用(function ($){ var settings = { PrevText: "Prev", NextText: "Next", PageSize: 10, RecordCount: 0, CurrentIndex: 1, ShowIndexNum: 5, //页码最大数 FrameCSS: "next", IndexCSS: "next02", CurrrentIndexCSS: "next... 阅读全文
posted @ 2011-11-17 02:14 anncesky 阅读(281) 评论(0) 推荐(0)

摘要:c#方式要添加CKEditor 和CKFinder两个DLL的引用 CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser(); _FileBrowser.BasePath = "/ckfinder/"; _FileBrowser.SetupCKEditor(CKEditor1);JS方式要添加<script src="/ckfinder/ckfinder.js" type="text/javascript"></script>JS引用 var 阅读全文
posted @ 2011-11-11 01:15 anncesky 阅读(485) 评论(0) 推荐(0)

摘要:(function ($){ var methods = { init: function (options) { options.obj = this; options.obj.children().bind("mousedown", options, methods.ondrag).unbind("click").css({ cursor: "move" }); }, destroy: function (options) { this.children().unbind("mousedown").css({ 阅读全文
posted @ 2011-04-16 06:29 anncesky 阅读(358) 评论(0) 推荐(0)

摘要:(function ($){ var methods = { init: function (options) { var table = this; table.next().bind("click", table, methods.addRow); var trArray = table.children().children("tr[ctrltype!='total']"); if (options.total) { // var newRow = methods.addRow(table); // newRow.children( 阅读全文
posted @ 2011-04-16 06:27 anncesky 阅读(270) 评论(0) 推荐(0)

摘要:1. js 中用 if 做判断var v="";var v=0;var v=undefined;var v=false;var v=null;if(!v){alert("False");} var vv="string" var res=v || vv;//res==vv 2. ReadOnly 在 阅读全文
posted @ 2011-04-10 10:02 anncesky 阅读(213) 评论(0) 推荐(0)

摘要:用IN 运算符var o={a:"1",b:"2"}for(var p in o){alert(p);//属性名alert(o[p]);//属性值}返回一个布尔值,指出一个对象是否具有指定名称的属性。object.hasOwnProperty(proName)参数object 必选项。一个对象的实例。 proName 必选项。一个属性名称的字符串值。 说明如果 object 具有指定名称的属性,那么 hasOwnProperty 方法返回 true;反之则返回 false。此方法无法检查该对象的原型链中是否具有该属性;该属性必须是对象本身的一个成员。示例 阅读全文
posted @ 2011-03-18 18:26 anncesky 阅读(517) 评论(0) 推荐(0)

摘要:偷懒直接用ajaxpro,方便,维护也方便,局域网的系统软件对性能要求不太高所以ajaxpro是个不错的选择。但是有些数据由JS取得传到后台转化有些不太一样。用js取得的日期,传到.net后台时,跟想要的结果会不一样1。var date=new Date(year,month,day);month必选项。表示的月份,是从 0 到 11 之间的整数( 1 月至 12 月)。所以要 new Date(year,month-1,day);2.new Date(year,month,day);是UTC时间北京时间和UTC时间差8小时左右所以 new Date(year,month-1,day, new 阅读全文
posted @ 2011-03-14 05:50 anncesky 阅读(202) 评论(0) 推荐(0)

摘要:Step 1First things first, we need something that looks awesome. So a quick trip to Photoshop and voila we have a nice mockup of what our tabbed compon... 阅读全文
posted @ 2011-03-13 10:00 anncesky 阅读(262) 评论(0) 推荐(0)

摘要:So you've become comfortable with jQuery and would like to learn how to write your own plugins. Great! You're in the right spot. Extending jQuery with plugins and methods is very powerful and can save you and your peers a lot of development time by abstracting your most clever functions into 阅读全文
posted @ 2011-03-13 08:41 anncesky 阅读(366) 评论(0) 推荐(0)

摘要:在javascript中关键字this是一个很难掌握的概念。它在不同的情况下指代不同的对象。下面就来看看,在JavaScript中各种this的使用方法有什么不同之处?1、在HTML元素事件属性中inline方式使用this关键字: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><divonclick="method(this)">element</div>这里的this代表触发onclick时间 阅读全文
posted @ 2011-03-13 03:09 anncesky 阅读(157) 评论(0) 推荐(0)

摘要:1。Array.prototype:就是Array的原型,很多时候理解这个原型有点不清不楚的其实,有点像.NET里的反射一个类凡是通过prototype加的属性,方法,都可以在这个类的对象里找到 对象.有时候我们也直接在某一对象添加属性方法,那么只能这个对象里找到,重新创建的对象是没有刚刚在上一对象里添加的属性方法的内置的类型可以通过prototype找到内置的属性方法Array.prototype.slice这句就是访问Array的内置方法因为Array是类名,而不是对象名,所以不能直接用Array.slice2。接下来说slice方法,这个简单返回一个数组的一段。arrayObj.slic 阅读全文
posted @ 2011-03-13 03:02 anncesky 阅读(7946) 评论(5) 推荐(5)

摘要:概述jQuery 是继 prototype 之后又一个优秀的 Javascript 框架。其宗旨是—写更少的代码,做更多的事情。它是轻量级的 js 库(压缩后只有21k) ,这是其它的 js 库所不及的,它兼容 CSS3,还兼容各种浏览器(IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)。 jQuery 是一个快速的,简洁的 javaScript 库,使用户能更方便地处理 HTML documents、events、实现动画效果,并且方便地为网站提供 AJAX 交互。 jQuery 还有一个比较大的优势是,它的文档说明很全,而且各种应用也说得很详细,同时还有 阅读全文
posted @ 2011-03-11 07:58 anncesky 阅读(114) 评论(0) 推荐(0)

摘要:set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo-- =============================================-- Author: <Anncesky>-- Create date: <2008/3/16>-- Description: <Paged>-- =============================================ALTER PROCEDURE [dbo].[usp_pagination] @tableName varchar(255), -- 表名 @c 阅读全文
posted @ 2011-03-11 05:45 anncesky 阅读(237) 评论(0) 推荐(0)

摘要:/******************表行变色*************************/function ShowRowColor(id) { var tbl = $(id)[0]; if (tbl) { for (var i = 1; i < tbl.rows.length; i++) { tbl.rows[i].onmouseover = function () { for (var j = 0; j < this.cells.length; j++) { this.cells[j].style.backgroundColor = "#EDF1E8" 阅读全文
posted @ 2011-03-11 05:43 anncesky 阅读(154) 评论(0) 推荐(0)

摘要:<?xml version="1.0" encoding="utf-8" ?><TextBoxSelectXML> <xs:schema id="TextBoxSelectXML" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name=" 阅读全文
posted @ 2011-03-11 05:36 anncesky 阅读(204) 评论(0) 推荐(0)

摘要:public interface IXmlAnalyze { object GetXmlModel(Page page, string dataKey); } public class XmlAnalyze : IXmlAnalyze { public static DataSet XmlDataSet = new DataSet("XmlDataSet"); private string filePath = string.Empty; public XmlAnalyze() { filePath = "/Resources/XML/TextBoxSelect. 阅读全文
posted @ 2011-03-11 05:33 anncesky 阅读(162) 评论(0) 推荐(0)

1 2 下一页