Some JavaScript functions and code snippets useful for JavaScript Programmers and JS scripts.
New JavaScript Code Snippets might be added soon.

  1. Show Google Map image with Geolocation JavaScript object
  2. Get Duration of Audio /Video file before Upload
  3. Refresh page if window width changes from a device size to other
  4. Shuffle / Randomize Array in JavaScript
  5. Zodiac Signs JavaScript code
  6. JavaScript strip_tags and stripslashes
  7. array_map and array_search in JavaScript
  8. JavaScript PHP is_ functions to test data type
  9. JavaScript trim, rtrim and ltrim
  10. Difference between two Dates - Time and Date
  11. Get Lower, Higher and Closest Number in JavaScript
  12. Get the value of the selected /checked checkboxes in a form
  13. Replace JavaScript variable name from string with its value
  14. Delete and Add CSS class
  15. Split an alphanumeric string into Array in JavaScript
  16. JavaScript base64 encode decode
  17. MD5 hash string in JavaScript
  18. SHA1 Encrypt data in JavaScript
  19. SHA256 Encrypt hash in JavaScript
  20. SHA512 Encrypt hash in JavaScript
  21. Get search data from URL address in JavaScript
  22. Get Domain Name and other Data from URL
  23. Disable button and Enable it after specified time
  24. Highlight Images on click
  25. Recursive function to create Multi-Level Menu in JavaScript
  26. Show and Hide HTML elements
  27. Select the Content of HTML Element
  28. Convert BBCode to HTML and HTML to BBCode with JavaScript
  29. Add Tag to Selected Text in textarea with JavaScript
  30. Detect when ScrollBar reaches the bottom of the page
  31. Get the Height and Width of web Page and browser Window
  32. Clear Canvas Context
  33. Add Text in Canvas from Input text field, as it is Typed
  34. Keep the first Nr IMG tags, Remove all the others
  35. Delete multiple consecutive characters and Split long words in JavaScript
  36. jQuery Drag and Drop Rows between two similar Tables
  37. Creating Tabs Effect with JavaScript
  38. Follow the mouse cursor with a DIV inside a Parent
JavaScript Code Snippets

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which attribute is used in <img> tag for the address of the image?
href src rel
<img src="http://coursesweb.net/imgs/webcourses.gif" width="191" height="63" alt="Courses-Web" />
Which CSS code hides the element on page?
display: none; display: inline; position: relative;
#id {
  display: none;
}
What instruction stops the execution of a while() or for() statement?
continue prompt() break
for(var i = 0; i< 8; i++) {
  if(i > 1) break;
  alert(i);
}
Indicate the function that can create a constant.
define() include() defined()
define("CONSTANT_NAME", "value");
echo CONSTANT_NAME;

Last accessed pages

  1. jQuery Drag and Drop Rows between two similar Tables (3712)
  2. Working with objects from Library in AS3 (1444)
  3. While and Do While (1856)
  4. Working with XML Namespaces in ActionScript (1427)
  5. Drag and Drop with jQuery UI (3984)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (35657)
  2. PHP-MySQL free course, online tutorials PHP MySQL code (28515)
  3. Read Excel file data in PHP - PhpExcelReader (27444)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (26638)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (23384)