how to get browser url in javascript
var currentUrl = window.location.href;function getURL() {
alert("The URL of this page is: " + window.location.href);
}const isAbsoluteUrl = url => /^[a-z][a-z0-9+.-]*:/.test(url);
// Example
isAbsoluteUrl('https://1loc.dev'); // true
isAbsoluteUrl('https://1loc.dev/foo/bar'); // true
isAbsoluteUrl('1loc.dev'); // false
isAbsoluteUrl('//1loc.dev');
Also in JavaScript:
- javascript get same elments from multiple arrays
- how to use dotenv in javascript
- how to create dynamic classes in tailwind typescript react
- how to remove 000webhost watermark 2019
- resize js
- javascript create checkbox with label
- js conditional key
- angular directive example
- merge two strings with alternate characters javascript
- append to top javascript
- how to select the first div in jQuery
- XJavascript:$.ge
- dracula theme color scheme windows terminal app
- how to move up in terminal
- parseint js
- render props
- javascript filter array of objects by key
- object values javascript
- open google chrome in puppeteer macos
- host angular app on node server
- paper material ui improt
- CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker"
- javascript string search case insensitive
- ScrollController not attached to any scroll views