Recent Notes

Displaying keyword search results 1 - 6
Created by James on May 03, 2012 14:54:46    Last update: May 03, 2012 14:54:46
History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. For HTML4 browsers it will revert back to using the old onhashchange functionality. All major browsers are supported. This is a simple test page to get started: <html> <head> <title>Test History</title> ... Note: state url must be provided for IE to generate a unique hash. YOu can prefix the state url with '?' ('#' does not work).
Created by James on March 29, 2011 11:34:53    Last update: March 29, 2011 11:34:53
The width() function returns the width of an element. The test page below shows how to retrieve widths for table cells. The row parameter can be omitted if columns in all rows are of same width. <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on March 29, 2011 11:25:35    Last update: March 29, 2011 11:25:35
With jQuery, it is pretty easy to access a table cell: just use the $('table tr:eq('+row+') td:eq('+column+')') selector. Below is a test page: <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on August 09, 2009 04:15:18    Last update: August 09, 2009 04:18:25
Operator Description Examples == is equal to '5' == 5 is true 3 == 3 is true 3 == 'a' is false === is exactly equal to (value and type) 5 === 5 is true 5 === '5' is false != is not equal to 5 != 8 is true 5 != 'a' is true 5 != '5' is false > is greater than 5 > 8 is false 5 < 8 is true 'a' < 'c' is true 'a' > '5' is true 'a' < 5 is undefined 'a >= 5 is undefined < is less than >= is greater than or equal to <= is less than or equal to Logical operators can be tricky. When in doubt, use Dr. Xi's JavaScript executor...
Created by Dr. Xi on March 02, 2009 23:29:08    Last update: March 28, 2009 21:35:41
An HTML form contains more than what meets the eye. This bookmarklet displays information about form fields in the page. When there are multiple forms on the page, successive invocations of the bookmarklet display each form in turn. Add this link to your bookmarks. Here's the code: <html> <body> <a href="javascript: i...
Created by Dr. Xi on September 01, 2008 01:01:59    Last update: September 02, 2008 15:55:05
In JavaScript, null is not the same as "undefined". The value null is an object, while "undefined" is, well, undefined. However, for undefined variable a , if (a){...} throws exception, but if (window.a) {...} returns false , even though they are the same thing! // 1. for undefined variable a, typeof functio...