Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

create link and click javascript

const link = document.createElement('a');
link.id = 'someLink'; //give it an ID!
link.href = 'https://example.com'; // Your URL

//Add the link somewhere, an appendChild statement will do.
//Then run this
document.getElementById('someLink').click();
Comment

PREVIOUS NEXT
Code Example
Javascript :: divide array of objects to 4 arrays js 
Javascript :: js get locale 
Javascript :: regExp for finding a first letter and last letter in a string 
Javascript :: use jetbrains mono in vscode 
Javascript :: inline style boarder radius jsx 
Javascript :: higher order functions event 
Javascript :: Fancybox 2 popup show no of images counter 
Javascript :: mongodb unshift array 
Javascript :: rafraichir page javascript 
Javascript :: add comma to number in javascript 
Javascript :: loopback unique field 
Javascript :: ace get contents of editor 
Javascript :: form to json 
Javascript :: jquery get label from select 
Javascript :: history.push.hook 
Javascript :: jquery select option value id no not exists 
Javascript :: how to connect mongoose database with nodejs 
Javascript :: js date difference in seconds 
Javascript :: get meta tag value from url javascript 
Javascript :: getelementbytagname js 
Javascript :: exit program js 
Javascript :: align text in javascript 
Javascript :: Convert underscore strings to camel Case 
Javascript :: has not class jquery 
Javascript :: sort an array by characters length in js 
Javascript :: javascript division get remainder 
Javascript :: json_encode escape 
Javascript :: google script get date without time 
Javascript :: js append query string to url 
Javascript :: string to kebab case 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =