4
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
4
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
8
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 do it define the 'target'.
If you want to make a simple link I recommend using the tag a
:
<a href="https://www.google.com" target="_blank">Txt</a>
I didn’t want to lose the style I had applied to div and you helped a lot. Thanks
Browser other questions tagged html
You are not signed in. Login or sign up in order to post.
Your element is a div and not a link, try to
<a href="/link" target="_blank" />
– BrTkCa
https://answall.com/a/39691/57801. , https://answall.com/q/75901/57801 , https://answall.com/q/39620/57801 , https://answall.com/a/40576/57801
– Don't Panic