`
robinqu
  • 浏览: 88905 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论
文章列表
Querying Selected Text 查询选择的文本 引用This is an area where little standardization exists, but it is possible to query the selected text in all modern browsers. 在这个方面,没有什么标准存在;但还是有可能读取用户选择的文本的: function getSelectedText() { if (window.getSelection) { // This technique is the most likely to ...
Finding Elements in a Document 在文档中查找元素 引用The document.documentElement property refers to the <html> tag that serves as the root element of the document. the document.body property refers to the <body> tag which is more commonly useful than its <html> parent. getElementsByTagNam ...
Scripting Documents Document编程 引用document.write() inserts text into an HTML document at the location of the <script> tag that contains the invocation of the method. write()方法在代码所在处插入文档内容 注意在完成文档修改后要调用close()方法 Document Properties Document的常见属性 bgColor cookie domain lastModifed location r ...
Window Geometry 窗口几何关系 引用Screen coordinates describe the position of a browser window on the desktop; they are measured relative to the upper-left corner of the desktop. Screen坐标系是描述浏览器窗口和桌面之间的几何关系的,其坐标是相对于桌面左上角的。 引用Window coordinates describe a position within the web browser's viewport; they ar ...
我们常用的一些函数都是全局对象window下面的。这里将其梳理一下: Timers 计时器 引用global functions setTimeout( ), clearTimeout( ), setInterval( ), and clearInterval( ). 引用Although the preferred way to invoke setTimeout( ) and setInterval( ) is to pass a function as the first argument, it is also legal to pass a string of JavaScri ...
The Window as Global Execution Context 窗口作为全局执行环境 引用document property for the Document object two self-referential properties, window and self a location property that refers to the Location object associated with the window. When a web browser displays a framed document the frames[] array of the ...
原文: http://www.21andy.com/blog/20071102/655.html 备份MySQL数据库的命令 mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql 备份MySQL数据库为带删除表的格式 备份MySQL数据库为带删除表的格式,能够让该备份覆盖已有数据库而不需要手动删除原有数据库。 mysqldump -–add-drop-table -uusername -ppassword databasename > backupfile.sql 直接将MySQL数据库 ...
原文地址:http://imysql.cn/mysql_backup_and_recover 目前 MySQL 支持的免费备份工具有:mysqldump、mysqlhotcopy,还可以用 SQL 语法进行备份:BACKUP TABLE 或者 SELECT INTO OUTFILE,又或者备份二进制日志(binlog),还可以是直接拷贝数据文件和相关的配置文件。MyISAM 表是保存成文件的形式,因此相对比较容易备份,上面提到的几种方法都可以使用。Innodb 所有的表都保存在同一个数据文件 ibdata1 中(也可能是多个文件,或者是独立的表空间文件),相对来说比较不好备份,免费的方案可以是 ...
命 令 名 描  述 @param  @argument 指定参数名和说明来描述一个函数参数 @returns       描述函数的返回值 @author 指示代码的作者 @deprecated 指示一个函数已经废弃,而且在将来的代码版本中将彻底删除。要避免使用这段代码 @see         创建一个HTML链接,指向指定类的描述 @version 指定发布版本 @requires 创建一个HTML链接,指向这个类所需的指定类 @throws @exception      描述函数可能抛出的异常的类型 {@link} 创建一个HTML链接,指向指定的类。这与@see ...
文字益处,浏览者习惯看到“...”来提示他们这行字还有其他部分,但是由于空间不够,网页帮你隐藏起来了。 这种效果除了在服务器端预处理,还可以用JS来折腾。其实CSS也可以实现,只是浏览器兼容性问题又让你不得好死…… 在这里发现一个思路很好的解决方法 http://www.cnblogs.com/hlz789456123/archive/2009/02/18/1392972.html 我也是遇到这个问题找帖子来救急的,FF下还是没搞定,但是按照这个思路肯定是可以的。以后再研究。 html代码: <div> <p><span>CSS Web Design ...
.svn文件夹清理起来很麻烦的~ 好在找到了一个注册表工具: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN] @="Delete SVN Folders" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command] @="cmd.exe /c \"TITLE Removing ...
做JavaScript的大型项目比较痛苦,它没有namespace的概念,所有顶级变量都在global对象里面混杂起来。特别是现在比较流行模块式开发,问题就越来越糟糕了,做出来的东西可能会把别人现有工程给搞残废……哈哈 看看老外是怎么解决这个问题的…… 引用If you want to write a module of JavaScript code that can be used by any script and can be used with any other module, the most important rule you must follow is to avoid ...
Duck Typing 引用If it implements all the methods defined by a class, it is an instance of that class. Duck typing is particularly useful in conjunction with classes that "borrow" methods from other classes. Earlier in the chapter, a Rectangle class borrowed the implementation of an equals( ) ...
判定JS的对象类型基本是MISSION Impossible。 JS的对象可能是JS核心对象、可能是自定义类、可能是空等等,但是其弱类型机制又无法有什么很准确的方法来判定这个对象到底是什么,特别是当这个东西是有继承的…… 引用typeof is use ...
Superclasses and Subclasses 之前的一篇文章讲解的类都是直接继承自Object的,这里会介绍如何在JS中实现继承自任意“类” 引用Java, C++, and other class-based object-oriented languages have an explicit concept of the class hierarchy. In JavaScript, the Object cla ...
Global site tag (gtag.js) - Google Analytics