使用jquery在同一窗口中打开链接

.bind(’click’,function(){window.open($(this).find(’。pc_more’)。html());}); });

这部分代码中是否有东西告诉它在新页面中打开链接? 我可以在同一个窗口中放置一些代码来打开链接吗?

您正在寻找:

.bind('click', function(){ window.location = $(this).find('.pc_more').html(); }); 

…假设.pc_more匹配的元素确实有一个链接作为其HTML

实例

尝试使用window.location而不是window.open()。

 window.location = $(this).find('.pc_more').html();