<img>标签的onclick属性的页面跳转怎么实现?
下面这行代码<img src="images/13.gif" alt="" width="544" height="44" border="0" usemap="#Map3" onclick=window.open('houtai/productBrowse.jsp') class='zczi'></td>
onclick后用window.open()来打开窗口跳到productBrowse.jsp页面。就是productBrowse.jsp是在一个新的弹出的窗口中打开的。我不想这样实现,想像浏览器一样页面跳转,不弹出新窗口要怎么改代码?
--------------------编程问答-------------------- window.open('houtai/productBrowse.jsp', '_self'); --------------------编程问答-------------------- window.location.href='houtai/productBrowse.jsp' --------------------编程问答-------------------- 前面的都可以呀
location.replace("'houtai/productBrowse.jsp") --------------------编程问答-------------------- window.location.replace='houtai/productBrowse.jsp' --------------------编程问答-------------------- 上面三层说的都行~ --------------------编程问答-------------------- window.open('houtai/productBrowse.jsp', '_self');
window.location.href='houtai/productBrowse.jsp'
都行 --------------------编程问答-------------------- window.location.href --------------------编程问答-------------------- 直接就可以写location.href 啊!! --------------------编程问答-------------------- window.open();我记得有多个属性,自己到网上查一下…… --------------------编程问答-------------------- open --------------------编程问答--------------------
支持一楼 --------------------编程问答-------------------- 结帖率:0.00%
--------------------编程问答-------------------- 好熟悉的代码。难道是那个毕业设计的网站? --------------------编程问答-------------------- window.location.href=""; --------------------编程问答-------------------- OK
补充:Java , Web 开发