表-td中的Javascript window.open [英] Javascript window.open in table -td

查看:71
本文介绍了表-td中的Javascript window.open的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi guys i struggle this part
 
 when i clicking my table row url i need to open another window .i have given my code can you please send correct syntax please help for this
 
$('#popupTable').append('<tr class="Action"><td><a href ="' + data[i].DocLink + '">View This Document </a></td></tr>'); 





我的尝试:



i尝试了不同的方法,但我没有得到我的解决方案。请帮我这个



What I have tried:

i tried different ways but i am not getting my solution .Please help me for this

推荐答案

('#popupTable')。append('< tr class =操作>< td>< a href ='+ data [i] .DocLink +'>查看此文档< / a>< / td>< / tr>');
('#popupTable').append('<tr class="Action"><td><a href ="' + data[i].DocLink + '">View This Document </a></td></tr>');





我的尝试:



i尝试了不同的方法,但我没有得到我的解决方案。请帮我这个



What I have tried:

i tried different ways but i am not getting my solution .Please help me for this


如果你想在新窗口或标签上打开一个链接,那么你需要添加一个target = _blank属性为标签,例如

If you want to open a link on a new window or tab then you need to add a target="_blank" attribute to the tag, e.g.
<a href="http://www.w3schools.com/" target="_blank">Visit W3Schools!</a>



了解更多信息http://www.w3schools.com/html/html_links.asp


这篇关于表-td中的Javascript window.open的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆