• Javascript除虫录


    1、$(function(){})

    $(document).ready(function(){

    doSomething();

    })

    替换掉下面的一切。

    //document.body.onload=init IE支持

    window.onload = init Dom标准

       

    $(function() { Jquery方式 成功

    //function init(){

     

    2、JQUERY回调函数的使用

    /// <reference path="jquery-1.3.2-vsdoc2.js" />

    $(function() {

    //var d = web_TreeView_TreeDemo.GetData('dd').value;

    var data = web_TreeView_TreeDemo.GetJson().value;

    data = eval('(' + data + ')');

    //{"Table":[{},{}]}

    data = data.Table || {}; ;

    $("#tree").showTree({ data: data, callback: function(t) {

    //此处的关键传值

    //是否可用 data:data,待测试

    t = t || window.event;

    doSomething(t);

    }

    });

    //fn(this, _self); TreeView

    function doSomething(event) {

    var $this = $(event); //把当前的值转换成jQuery对象

    TreeNodeClick(data[parseInt($this.attr("no"))].url + '?flowid=' + data[parseInt($this.attr("no"))].id, 'main', data[parseInt($this.attr("no"))].windowtype, data[parseInt($this.attr("no"))].dialogwidth, data[parseInt($this.attr("no"))].dialogheight);

    //alert($this.attr("no"));

    }

    //$(:text").bind("keyup", function(event) {

    //event = event || window.event;

    //var target = event.target; //这个就是触发事件的控件

    //});

    //$("a.demo").click(function() { window.open(url, target, "") });

     

     
     
    作者:易简.道    
     
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    图像梯度计算
    图像轮廓检测
    元组()
    SwiftUI 概览
    TCL 语言概览
    列表 []
    Numpy 矩阵计算
    图像平滑(滤波)
    language="JavaScript"与type="text/javascript"
    调用接口, Test.java(不用任何包, MD5大写32位加密,HttpURLConnection)
  • 原文地址:https://www.cnblogs.com/xyicheng/p/1674104.html
Copyright © 2020-2023  润新知