URL validation regex JavaScript | Example code

URL is valid or Invalid can check the RegExp in match method in JavaScript. URL validator JavaScript URL validation regex JavaScript Example HTML example code: – Check if a JavaScript string is a URL A validate URL with or without http No matter what function return true and false based on structure of URL. Output: Read More…


Website URL validation in JavaScript | Example code

With Regular expression you can easily verify valid Website URL in JavaScript. Regex Website URL validation in JavaScript HTML example code JavaScript function to check whether a given value is an valid website URL or not. It will validate URL with or without HTTP/HTTPs. Output: Do comment if you have any doubts and suggestion on Read More…


Facebook URL validation in JavaScript | Example code

Regular expressions is flexible enough to validate a FaceBook URL in JavaScript. Code of Facebook URL validation in JavaScript HTML example code Output: For Twitter and Facebook Do comment if you have any doubts and suggestion on this JS URL code. RohitDegree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Read More…



JS Regex URL validation | Example code

JS Regex url validation is very simple, just match method. Complete Example code URL validation in JS Website URL validation with regex code. Output: Do comment if you have any doubts and suggestions on this JS URL code. RohitDegree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology Read More…


Open multiple tabs with one link | JavaScript code

For example, we want to open 2 URLs (http://google.com and http://yahoo.com) in a different tab with one link click. You can do it in 2 ways defining in a tag or use JavaScript. But in both cased you have to use a window.open method. Open multiple tabs with one link Examples Here is a basic Read More…


URL validation in JavaScript | Example code

Use Regular expression (RegEx) to validate a URL in JavaScript. URL validation in JavaScript Example Below Example, code creates a function to validate URL with or without HTTP/HTTPS. Testing a multiple condition and format URL validation in JS. Output: Note that per RFC 3886, URL must begin with a scheme (not limited to http/https), e. Read More…


JavaScript open URL in a modal window | Example code

Use window open() method to popup an window tab as a modal with URL. Note: JavaScript already has ShowModalDialog function but it does not work in all browser. JavaScript open URL in a modal window Example HTML example code: Output: More parameters can use in window.open You can freeze the parent window and when the Read More…


Multiple href in one link example | JS Code

You can’t Multiple href in one link HTML alone, because there’s only a single href attribute. Use the window.open() method in JavaScript: Multiple href in one link In JavaScript Complete example code: In Anchor tag In Script In function call window.open(‘url’). Example code create a multiple link for a single <a href> tag. Output: Do Read More…


JavaScript open URL in new window/tab | Example code

Use window.open() method to open URL in new window/tab in JavaScript. Don’t forget to add target=”_blank” in the method. JavaScript open URL in new window Example HTML Example code: It will open automatics new tab with URL. Output: If you want to on click anchor tag:- Specify a width/height new window tab Do comment if Read More…