Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

open a new tab when clicking on a link react

<td onClick={()=> window.open("someLink", "_blank")}>text</td>
Comment

react onclick new tab

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

how i do button when click open a new tab in react

<a  className="btn btn-primary  btn-outline btn-lg"  href="https://google.com/" rel="noopener noreferrer" target="_blank">google</a>
Comment

PREVIOUS NEXT
Code Example
Javascript :: react js input autocomplete off 
Javascript :: uuid use in express 
Javascript :: js reverse str case 
Javascript :: find difference in array of objects javascript 
Javascript :: change image src jquery 
Javascript :: js do after delay 
Javascript :: javascript get element by class name change style 
Javascript :: stringify 
Javascript :: slice eliminar el ultimo caracter 
Javascript :: legacy react start 
Javascript :: convert buffer to base64 javascript 
Javascript :: redirect not found in react-router-dom 
Javascript :: Sort numbers from an array in javascript 
Javascript :: javascript allow only alphanumeric characters 
Javascript :: javascript autoplay audio 
Javascript :: usehistory example 
Javascript :: in array in js 
Javascript :: lip. dips *dipped. also mm bpi. -opp. -ditty 
Javascript :: vscode file cannot be loaded because running scripts is disabled on this system 
Javascript :: html form clear 
Javascript :: tostring javascript 
Javascript :: react native build apk 
Javascript :: moment hour minute 
Javascript :: js remove spaces 
Javascript :: javascript object syntax example with find 
Javascript :: public class NameOf { public static String nameof<T(Expression<Func<T name) { MemberExpression expressionBody = (MemberExpression)name.Body; return expressionBody.Member.Name; } } 
Javascript :: gatsby-plugin-create-client-paths 
Javascript :: textbox text change jquery 
Javascript :: remove duplicate objects from array javascript 
Javascript :: nuxt small scroll 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =