Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react onclick new tab

const openInNewTab = (url) => {
  const newWindow = window.open(url, '_blank', 'noopener,noreferrer')
  if (newWindow) newWindow.opener = null
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: node string to json 
Javascript :: jquery set input checked 
Javascript :: react native margin 
Javascript :: regex for time in hh:mm:ss 
Javascript :: protractor window size 
Javascript :: Bootstrap modal hide and show 
Javascript :: chartjs remove legend 
Javascript :: regex expression dd/mm/yyyy javascript 
Javascript :: javascript repeat element in array 
Javascript :: js split last occurence 
Javascript :: getting user input in node js 
Javascript :: javascript check if array is empty 
Javascript :: remove empty or whitespace strings from array javascript 
Javascript :: javascript check if value is not empty string 
Javascript :: jquery cancel ajax request on click 
Javascript :: install tailwind nextjs 
Javascript :: mac install jmeter 
Javascript :: js get url parameter 
Javascript :: js get user location 
Javascript :: js number add zero before 
Javascript :: title case a sentence-javascript 
Javascript :: javascript max length with elipsis 
Javascript :: fs in angular 
Javascript :: js password validation regex 
Javascript :: conditinally add object js 
Javascript :: login to discord using token 
Javascript :: local storage check max size 
Javascript :: axios try catch get error status cocxe 
Javascript :: jvascript number to column letter 
Javascript :: object to query string javascript 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =