随笔分类 -  jquery

摘要:1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 2: 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w... 阅读全文
posted @ 2012-04-17 11:03 高捍得 阅读(595) 评论(0) 推荐(0)
摘要://扩展jQuery对json字符串的转换jQuery.extend({ /** * @see 将json字符串转换为对象 * @param json字符串 * @return 返回object,array,string等对象 */evalJSON: function (strJson) {return eval("(" + strJson + ")");} });jQuery.extend({ /** * @see 将javascript数据类型转换为json字符串 * @param 待转换对象,支持object,array,string,functi 阅读全文
posted @ 2012-03-23 14:11 高捍得 阅读(955) 评论(0) 推荐(0)
摘要:前台代码 <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link href="jquery.jqGrid-4.3.1/css/ui.jqgrid.css" rel="stylesheet" type="text/css" /> <script src="j... 阅读全文
posted @ 2012-03-22 17:06 高捍得 阅读(1389) 评论(0) 推荐(0)
摘要:此代码 官方网站:http://www.fyneworks.com/jquery/xml-to-json/ 不知道怎么添加附加,只好把 源代码贴出来: 自定义载入xml函数 function loadXMLDoc(dname) { try //Internet Explorer { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); } catch (e) { try //ff, Mozilla, Opera, etc. { ... 阅读全文
posted @ 2012-03-22 14:52 高捍得 阅读(1597) 评论(0) 推荐(0)
摘要:今天 搞 这个tree弄了半天没出数据,后来又 深入研究了一下 官网给的php的例子,本来确实看不懂, 静下心来研究了一下,终于搞懂了 先看一下 成果: 下面贴代码: $("#treegrid").jqGrid({ treeGrid: true, treeGridModel: 'adjacency', ... 阅读全文
posted @ 2012-03-20 14:56 高捍得 阅读(7150) 评论(0) 推荐(0)
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22> <html xmlns="http://www.w3.org/1999/xhtml%22> <head> <title></title> <link href="jquery.jqGrid-4.3.1/css/ui.jqgrid.css 阅读全文
posted @ 2012-03-09 12:39 高捍得 阅读(2680) 评论(0) 推荐(0)
摘要:首先引用JQ文件,下面是所有代码; 主页面代码: 数据库数据: 脚本文件: function addli(object) { var text = object.innerText; var url = object.id; var html = "<div class=\"r_right_nav_div\" ondblclick=\... 阅读全文
posted @ 2012-01-05 13:39 高捍得 阅读(1164) 评论(0) 推荐(0)
摘要://跟随鼠标 $(window).mousemove(function () { // document.createElement("<div id=dsa></div>"); $("#id").offset({ left: event.x, top: event.y }); }) //编辑... 阅读全文
posted @ 2011-12-29 17:59 高捍得 阅读(165) 评论(0) 推荐(0)
摘要:$(“form ~input”) //和from同级的 元素 $("input[type=checkbox]:checked") //所有选中的checkbox $("#id").animate({ top: 100 }, "slow", "swing"); //选择的元素要加 position属性 dropdownlist操作 $("#id").change(function(){}); //添加事件 $("#id").find("option:selected& 阅读全文
posted @ 2011-12-29 14:37 高捍得 阅读(1667) 评论(0) 推荐(0)
摘要:unescape($("#id").val()) // html解码 escape($("#id").val()) //html编码 非常易用的JS,使用啊。 阅读全文
posted @ 2011-12-28 12:10 高捍得 阅读(178) 评论(0) 推荐(0)
摘要:脚本: <script type="text/javascript"> $(document).ready(function () { $("ul").find("li:eq(0)").addClass("over"); //初始化背景 $("div ul li").mouseover(function () { $("#ima").attr("src", "../image/" + $(this).text() + &qu 阅读全文
posted @ 2011-12-27 08:41 高捍得 阅读(1421) 评论(0) 推荐(0)