which is the right syntax for this? tempInput.setAttribute('type', 'text');…
- User
which is the right syntax for this? tempInput.setAttribute('type', 'text'); tempInput.value = window.location.href;
code// Append it to the document body document.body.appendChild(tempInput); // Click event on tempInput to copy URL to clipboard $(tempInput).on('click', function() { // Select the input content $(tempInput).select(); //alert("ok"); window.open("https://www.youtube.com/results?search_query="window.location.href); - Assistant