1、funciton的js如果直接写是不会执行的 例如

function TableInit() {
//var treeNode = $('#otherTree').omTree('getSelected');//获取正在被选中的树节点
//tableID = treeNode.id;//获取表名 $('#PrintTable').omGrid({
height : ,
width : '100%',
limit : , //分页显示,每页显示10条
singleSelect : false, //出现checkbox列,可以选择同时多行记录
colModel : [ {
header : '报表名称',
name : 'reportName',
width : ,
align : 'center'
}, {
header : '报表尺寸',
name : 'reportSize',
width : ,
align : 'left',
wrap : true
}, {
header : '创建人',
name : 'add_user',
width : ,
align : 'left',
wrap : true
} ],
dataSource : "filemanagement!printData.htm?id=" + "" //后台取数的URL
});
}

如果要执行必须

TableInit();

  

或者$(document).ready()、$开头的function都可以默认执行

js的function的更多相关文章

  1. JS 关于(function( window, undefined ) {})(window)写法的理解

    JS 关于(function( window, undefined ) {})(window)写法的理解 [网络整理] (function( window, undefined ) {})(windo ...

  2. js小记 function 的 length 属性

    原文:js小记 function 的 length 属性 [1,2,3]., ,这个略懂js的都知道. 但是  eval.length,RegExp.length,"".toStr ...

  3. js中function的与众不同

    js中function的与众不同在于可以被调用

  4. JS里面function和Function的区别

    js里Function 与 function的不一样的,不仅仅是大小写的问题. 简单点说:大写的Function是一个类 ,而小写的function是一个对象. Function是一个构造器,func ...

  5. js arrow function return object

    js arrow function return object bug filterData: { type: Object, default: () => {}, required: true ...

  6. how to remove duplicates of an array by using js reduce function

    how to remove duplicates of an array by using js reduce function ??? arr = ["a", ["b& ...

  7. js currying function All In One

    js currying function All In One js 实现 (5).add(3).minus(2) 功能 例: 5 + 3 - 2,结果为 6 https://stackoverflo ...

  8. Js函数function基础理解

    正文:我们知道,在js中,函数实际上是一个对象,每个函数都是Function类型的实例,并且都与其他引用类型一样具有属性和方法.因此,函数名实际上是指向函数对象的指针,不与某个函数绑定.在常见的两种定 ...

  9. js中function函数

    function:是具备某个功能的方法,方法本身没有意义,只有执行方法才有价值. function: 1 创建一个函数: 2 执行这个方法: 例: 创建 function 方法名(){ 存放某个功能的 ...

  10. js中function参数默认值

    --在dreamweaver做网站时,函数定义是在一个*.js文件中,其中定义了一个func,有四个参数,function func(string1,url,flag,icon),然后在另一个asp中 ...

随机推荐

  1. 1.4 算法 - algorithm

    1)概述 2)示例 //algorithm find演示 #include <vector> #include <algorithm> #include <iostrea ...

  2. 三、jQuery--Ajax基础--Ajax全接触--扩展知识(跨域)

  3. WdatePicker 开始日期不能大于结束日期,结束时间不能小于开始时间

    <input class="input_calendar inputcss" id="startDate" runat="server" ...

  4. git 使用技巧

    让git不检测文件权限 在android根目录执行:repo forall -c git config core.filemode false即可 修改默认编辑器: git config –globa ...

  5. poj 1006:Biorhythms(水题,经典题,中国剩余定理)

    Biorhythms Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 110991   Accepted: 34541 Des ...

  6. HTML5的input color系统颜色选择器

    前两天,我写了一篇<推荐两款jQuery色盘选择器>介绍,那是使用JavaScript实现的色盘,今天我给大家介绍HTML5的色盘选择器.HTML5有一个input类型为color,即颜色 ...

  7. [LeetCode] Min Stack

    Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. pu ...

  8. macosx安装MySQLdb

    折腾了半天,记录一下. 先按照这个步骤安装mysql-python 如果python setup.py install 时候出现clang 错误,运行 python -E setup.py insta ...

  9. Solr入门之(2)快速启动:第一个例子

    Solr作为一个web应用来启动,因此需要JDK支持,需要WEB容器,本文环境如下: JDK6.0或以上(环境变量设置等不再赘述) Tomcat-6.0.35或以上(自行下载) apache-solr ...

  10. 使用html5的离线缓存技术

    突然想用html5的离线缓存,但是一直没有成功,在各种群里问发现很多人都没什么经验,最终终于在各种论坛找到解决方案了.下面就简单记录一下相关情况. 一.离线缓存的优点 我们都知道离线缓存主要是用来减少 ...