同页面跳转
<form name="searchForm" action="/search/" method="get" target="_blank"> <div name="inputbox" class="y-box input-group"> <input class="y-left input-text" name="keyword" autocomplete="off" ga_event="mh_search" type="text" placeholder="请输入关键字"> <div class="y-right btn-submit"> <button type="submit" href="javascript:;"> <i class="y-icon icon-search" ga_event="mh_search"></i> </button> </div> </div> </form>
document.getElementsByClassName("icon-search")[0].parentElement.target="_self"
document.getElementsByClassName("icon-search")[0].parentElement.click()
document.getElementsByClassName("icon-search")[0].parentElement.href="_self"
document.getElementsByClassName("icon-search")[0].parentElement.click()
window.location.href='https://www.toutiao.com/search/?keyword=风波后现身'