dddddd
(function(window){
var com = function(box){
this.box = document.querySelector(box);
}
window.zhanglei = function(box){
return new com(box);
}
com.prototype ={
addClass:function(cls){
if('classList' in this.box){
this.box.classList.add(cls);
}else{
var preCls = this.box.className;
var newCls = preCls +' '+ cls;
this.box.className = newCls;
}
return this.box;
}
}
})(window)
zhanglei('.box').addClass('zhang');
dddddd的更多相关文章
- 字符串aaaa......bbbb....ccc...dddddd用正则替换为abcd
public static void main(String[] args) { String s = "aaaa......bbbb....ccc...dddddd"; Stri ...
- 基于ABP实现DDD--DDD相关概念
什么是DDD呢?领域驱动设计[DDD]是一种针对复杂需求的软件开发方法.将软件实现与不断发展的模型联系起来,专注于核心领域逻辑,而不是基础设施细节.DDD适用于复杂领域和大规模应用,而不是简单的C ...
- LeetCode-5LongestPalindromicSubstring(C#)
# 题目 5. Longest Palindromic Substring Given a string S, find the longest palindromic substring in S. ...
- Vue-Router 页面正在加载特效
Vue-Router 页面正在加载特效 如果你在使用 Vue.js 和 Vue-Router 开发单页面应用.因为每个页面都是一个 Vue 组件,你需要从服务器端请求数据,然后再让 Vue 引擎来渲染 ...
- 十分钟玩转 jQuery、实例大全
一.简介 定义 jQuery创始人是美国John Resig,是优秀的Javascript框架: jQuery是一个轻量级.快速简洁的javaScript库.源码戳这 jQuery对象 jQuery产 ...
- DOM、BOM 操作超级集合
本章内容: 定义 节点类型 节点关系 选择器 样式操作方法style 表格操作方法 表单操作方法 元素节点ELEMENT 属性节点attributes 文本节点TEXT 文档节点 Document 位 ...
- CodingLife主题更新
收到反馈说CodingLife主题某些地方显示有问题,于是进行了更新,并且已提交.官方那边正在进行测试,我自己这边测完应该是没问题的,但不知道官方啥时候会进行更新,所以把CSS代码贴出来,有需要的可以 ...
- C#与C++的发展历程第四 - C#6的新时代
*:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; } /* ...
- HTML5移动开发学习笔记之CSS3基础学习
CSS回顾 在学CSS3之前首先巩固下CSS的基础知识. 1.CSS框模型 举例子: #box { width: 70px; margin: 10px; padding: 5px; } 这个代码将出现 ...
随机推荐
- docker help
localhost == 127.0.0.1 == 本机ip ifconfig 或者 ip addr 查看本地宿主机的ip地址 $ docker help Usage: docker [OPTIONS ...
- iOS 6.0之后支持一个页面横屏的方法
拿两个页面举例子: 0.开启旋转: 1.第一个界面实现以下方法 /** * 默认显示的方向,preferredInterfaceOrientationForPresentation必须返回一个支持的接 ...
- QRCode二维码生成
pom配置 <dependency> <groupId>com.github.cloudecho</groupId> <artifactId>qrcod ...
- WCF Misconfiguration: Security Not Enabled
Abstract: No transport or message security has been defined. Explanation: Applications that transmit ...
- Elasticsearch常用配置及性能参数
cluster.name: estest 集群名称node.name: “testanya” 节点名称 node.master: false 是否主节点node.data: true 是否 ...
- SRM 146 DIV1 800
Problem Statement The purpose of a roundabout is to control the flow of traffic at a busy inter ...
- 8.16 CSS知识点7
display(元素显示模式) 语法: display : block | none | inline | inline-block display 属性用来设置元素的显示方式. block ...
- HTML5 canvas beginPath() 方法
beginPath() 方法开始一条路径,或重置当前的路径.w3school上的解释! 路径是canvas里很重要的一个概念,刚开始学canvas的人对路径理解不是很深,他们在用canvas的时候会乱 ...
- sqllite
public static void tt() { int ID = 0; while(true) { stri ...
- JavaScript DOM编程艺术读书笔记(四)
第十章 实现动画效果 var repeat = "moveElement('"+elementID+"',"+final_x+","+fin ...