JavaScript Code Snippets


23 May, 2018   

Add to bookmarks bar, select text, click it to get the word count.

Find the length of the array before using it in the for function

JavaScript code snippet to Remove the Last Character from a String

Javascript append function "DOM Append Text and Element Functions"

The Gmail Bookmarklet will add a unique string to the email signature to prevent Gmail from trimming the content.

29 December, 2016   

JavaScript code snippet to test if Mac or PC

21 December, 2016   

Convert Polygon to Path Data code snippet by Chris Coyier

A JavaScript implementation of the famous sprintf() function

11 September, 2016   

Website won't display in a frameset. Site will jump out of the frameset.

24 July, 2016   

Dynamically add form fields to your forms.

28 June, 2016   

JavaScript code example for Parse Zapier apps list

Use this in the <head> of your HTML files.

13 December, 2015   

Bind onload function to the iFrame and set the size of the iFrame to the iFrames loaded content. In the example jQuery is used.

18 November, 2015   

Bind onload function to the iFrame and set the size of the iFrame to the iFrames loaded content. In the example jQuery is used.

01 November, 2015   

Returns a random number.

Confirm a deletion (or any action) with Javascript.

12 February, 2015   

JS sniffer detects browser and OS.

21 January, 2015   

Cool script changes your SELECT elements into a Select/Combobox element. Works in Firefox and IE 6+.

31 December, 2014   

Function that allows a Javascript cookie to be set after HTML has been output to the page.

19 November, 2014   

Enable a link after a set period of time.