原型对象用字面量赋值时需要注意将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
js中生成json对象 js中解析json字符串: 1.eval("..."): ? var a_id=eval(‘{"name":123}’); ? 如果eval中的内容含有恶意脚本就麻烦了 2.json_parse: ? 需要导入json_parse.js: ? <script src="js/json...
分类:
Web程序 时间:
2014-09-12 20:50:34
阅读次数:
247
检测播放器域用户在上面观看媒体内容的网页的 URL 和域并非始终随时可用。如果托管网站允许,您可使用 ExternalInterface 类获取确切 URL。尽管如此,允许第三方视频播放器的一些网站不允许使用 ExternalInterface。在这种情况下,您可通过 Security 类的page...
分类:
其他好文 时间:
2014-09-12 13:21:43
阅读次数:
140