刚刚开始正式的职业生涯,最近几天在给公司做统一的头部js,想到了一个通过script自定义属性传递配置参数的方法。有时候我们编写了一个js插件,要使用该插件需要先在html中引入该插件Js,然后再添加一个script标签,在里面调用。如一个图片切换的插件。其代码大致如下: $.fn.p...
分类:
其他好文 时间:
2014-09-14 19:18:57
阅读次数:
180
<script>
????function?Person(name,?age)?{
????????this.name?=?name;
????????this.age?=?age;
????????this.family?=?["father"?,?"mather"?,?"sister"]?;
???...
分类:
编程语言 时间:
2014-09-14 18:09:57
阅读次数:
182
原型对象用字面量赋值时需要注意将constructor指回原对象。 <script>
????function?Person(name?,?age){
????????this.name?=?name?;
????????this.age?=?age?;
????????t...
分类:
编程语言 时间:
2014-09-14 16:47:27
阅读次数:
164
1、编辑文件 /etc/rc.local
vim /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to...
分类:
系统相关 时间:
2014-09-14 15:25:57
阅读次数:
239
<script>
????function?Person(name?,?age){
????????this.name?=?name?;
????????this.age?=?age?;
????????this.say?=?function?(){
????????????retur...
分类:
Web程序 时间:
2014-09-14 12:56:47
阅读次数:
144
dojo框架:http://dojotoolkit.org/ <!DOCTYPE?html>
<html>
<head>
????<meta?charset="UTF-8">
????<title>dojo框架绑定函数与上下文</title>
????<script??src?=?"dojo/dojo/dojo.js"??>...
分类:
其他好文 时间:
2014-09-14 11:34:37
阅读次数:
213
本文主要讲述如下几个问题:
1.什么是函数,怎么创建函数?
2.怎么调用一个函数?
3.函数是怎么工作的?
4.怎么向函数传递参数?
5.函数怎么返回值和返回一个局部变量的值。
一、创建函数(什么是函数)
在batch script 中的函数以一个标签开始,并以goto:eof结束,如下:
script
:myDosFunc -...
分类:
其他好文 时间:
2014-09-13 17:20:01
阅读次数:
274
这个函数也会导致浏览器同名的默认行为的执行。比如,如果用trigger()触发一个‘submit‘,则同样会导致浏览器提交表单。如果要阻止这种默认行为,应返回false。 <script type="text/javascript"> ? ?$(function(...
分类:
Web程序 时间:
2014-09-13 15:59:56
阅读次数:
238
在用apt-get安装软件时出现了类似于 install-info: No dir file specified; try –help for more information.dpkg:处理 gettext (–configure)时出错: 子进程 post-installation script...
分类:
其他好文 时间:
2014-09-13 14:33:45
阅读次数:
227
<html> <body> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <!--<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>--> <script > ??? $(function(){ ?...
分类:
移动开发 时间:
2014-09-12 23:35:44
阅读次数:
427