Follow the code below that I'm having difficulty using target="_ blank" how could I solve this?
<div class="opt" onCLick="location.href='#';">Txt</div>
Thank you very much
Follow the code below that I'm having difficulty using target="_ blank" how could I solve this?
<div class="opt" onCLick="location.href='#';">Txt</div>
Thank you very much
If you really want to use a div to create a link, follow the example using Javascript :
<div class="opt" onCLick="window.open('https://www.google.com','_blank');">Txt</div>
Replace 'location.href' with 'window.open', so you can set the 'target'.
If you want to make a simple link I recommend that you use the tag a
:
<a href="https://www.google.com" target="_blank">Txt</a>