Some JavaScript functions and code snippets useful for Programmers and JS scripts.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Click on the HTML tag which creates an horizontal line in web page.
<br /> <em> <hr />
Some content ...
<hr />
Content under line ...
Which CSS property defines the text color?
font-style font-variant color
h2 {
  color: #cbdafb;
}
Click on the function which searches if a character, or text exists in a string.
indexOf() toString() split()
var str = "Web courses - http://CoursesWeb.net/";
if(str.indexOf("http://") == -1) alert("http:// isn`t in string");
else alert("http:// is in string");
Which function splits a string into an array of strings based on a separator?
array_merge() explode() implode()
$str = "apple,banana,melon,pear";
$arr = explode(",", $str);
var_export($arr);      // array (0=>"apple", 1=>"banana", 2=>"melon", 3=>"pear")
JavaScript Code Snippets

Last accessed pages

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (98509)
  2. PhpSpreadsheet - Read, Write Excel and LibreOffice Calc files (19140)
  3. Voting Poll System script PHP-AJAX (6520)
  4. Disable button and Enable it after specified time (8431)
  5. Read Excel file data in PHP - PhpExcelReader (72672)

Popular pages this month

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (1080)
  2. Contact page - CoursesWeb (1052)
  3. Tabs effect with CSS (1048)
  4. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (451)
  5. PHP getElementById and getElementsByTagName (332)