Quantcast
Channel: Marius' Blog » JavaScript jQuery
Browsing all 4 articles
Browse latest View live

JavaScript Email Validation

Below JavaScript function returns true if the email address given as parameter is valid, false otherwise. JavaScript code: function validEmail(email){     var...

View Article


How to validate a string characters with JavaScript

This JavaScript function returns true if the characters from a string are valid, false otherwise. The characters for validation are given as a string parameter. JavaScript code:...

View Article


How can you trigger an event in JavaScript (using jQuery) when an image is...

This JavaScript code will trigger an event when an image is completely loaded. You need to have the jQuery Library. JavaScript code: var img = new Image(); $(img).load(function(){...

View Article

Create, modify and read a Cookie with JavaScript

The first function creates or modifies a cookie. The second one returns the value of a cookie. JavaScript code: setCookie("MyCookie", "jump", 7); // The Cookie "MyCookie" has the value "jump" and...

View Article
Browsing all 4 articles
Browse latest View live