简体   繁体   中英

Using JQuery/Javascript to redirect a webpage

So guys I have a JSP page( #addressbar as < object > ) inside < div > of another JSP page( #homepage ). Is there a way to access(or just redirect) #homepage with Jquery script which is called by submitting a form in #adressbar page? Otherwise when I redirect from #adressbar only < div > of #homepage is changed.

Have you tried some thing like this

$( "#addressbar" ).load( "/homepage" );

尝试使用window.location.href属性:

window.location.href= 'http://www.example.com'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM