jquery面向对象写法
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript"> var Test={
"P": 60,
"Chengfa":function(t){
return t*this.P;
}
}; alert(Test.Chengfa(5));
</script>
</head> <body>
This is my JSP page. <br>
</body>
</html>
jquery面向对象写法的更多相关文章
- jquery插件写法
//传统写法 //全局方法 ;(function($){ $.method = function(){ } //or $.obj = { method1:function(){}, method2:f ...
- [转]jQuery插件写法总结以及面向对象方式写法
本文转自:http://www.xuanfengge.com/jquery-plug-in-written-summary-and-summary-of-writing-object-oriented ...
- Jquery插件写法及extentd函数
JQuery插件写法 JQuery插件又分为类扩展方法和对象扩展方法两种,类插件是定义在JQuery命令空间的全局函数,直接通过可调用,如可调用,如可调用,如.ajax():对象插件是扩展JQuery ...
- jQuery 插件写法2
转载:http://www.xuanfengge.com/jquery-plug-in-written-summary-and-summary-of-writing-object-oriented-m ...
- jQuery 插件写法
一.jQuery插件的类型 1. jQuery方法 很大一部分的jQuery插件都是这种类型,由于此类插件是将对象方法封装起来,在jQuery选择器获取jQuery对象过程中进行操作,从而发挥jQue ...
- jquery函数写法
普通jquery函数写法 <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script&g ...
- jquery常用写法简单记录
好久不写东西了......话不多说,主要记录一下,最近做的项目中用到的js的记录(虽然特别特别简单) 一 jquery常用写法记录 jQuery(this).addClass("select ...
- 粗看ES6之面向对象写法
标签: es6 在es6以前,js没有类的概念,虽然有构造函数原型的方式用来做面向对向开发,但是对于书法并不是十分友好,而且对于继承实现也不是十分友好. es6引入class constructor ...
- 3、jQuery面向对象
1.首先介绍callback.js对ajax进行了封装 function ajaxFunction(){ var xmlHttp; try{ // Firefox, Opera 8.0+, Safar ...
随机推荐
- poj 2593&&poj2479(最大两子段和)
Max Sequence Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 16850 Accepted: 7054 Des ...
- 确实,k8s的时代,ingress负载用traefik比nginx方便啊
参考文档: https://mritd.me/2016/12/06/try-traefik-on-kubernetes/#13ingress 由于微服务架构以及 Docker 技术和 kubernet ...
- C#使用NOPI生成excel要点记载
很久没动手写博客了,最近由于公司比较忙,接触了不同类容,对自己的技术和业务理解有了更深入的理解.今天有点小空,将前段时间所运用到的一些知识点记录下来. 由于公司业务需要统计一些数据,所以对于我们来说, ...
- CentOS7.5***
一.借助谷歌上网助手 二.用ss来实现*** 下载工具 sudo yum install shadowsocks-libev 修改配置文件 sudo chmod 777 /etc/shadowsock ...
- 【转载】RecyclerView源码解析
原文地址:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2016/0307/4032.html 概述 之前面试的时候经常有人问是否用过Re ...
- Java-多线程编程(一)
创建多线程 [Thread class]1.继承Thread类,重写run() [Runnable接口]2.实现Runnable接口,重写run() [*Callable接口]3.实现Callable ...
- 关于Spring和SpringMVC的一点感悟
一年前,我们项目最开始使用的SSH(spring+springmvc+hibernate),那时候项目经理搭建好了框架就交给了我们,后来在一次配置事务的过程中,出现了大名鼎鼎的no seesion. ...
- Standard Java集合类问题待整理
1. HashSet.LinkedHashSet和TreeSet HashSet采用散列函数对元素进行排序,是专门为快速查询而设计的.存入HashSet的对象必须定义hashCode方法. TreeS ...
- Topcoder Srm 673 Div2 1000 BearPermutations2
\(>Topcoder \space Srm \space 673 \space Div2 \space 1000 \space BearPermutations2<\) 题目大意 : 对 ...
- BZOJ 1229 [USACO2008 Nov]toy 玩具(三分+贪心)
[题木链接] http://www.lydsy.com/JudgeOnline/problem.php?id=1229 [题目大意] 每天对玩具都有一定的需求ni,每天可以花f价值每条购买玩具, 当天 ...