摘要:点击按钮有前进后退效果点击按钮有前进后退效果
小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。
点击按钮有前进后退效果
<!DOCTYPE html> <html lang="en"> <script> console.log(window.history); //在地址栏加上?id=数字,会发现控制台的长度变化 console.log(window.screen.width); console.log(window.screen.height); alert(window.document); </script> <head> <meta charset="utf-8"> </head> <body> <input type="button" value="前进" onclick="javascript:window.history.forward();" /> <input type="button" value="后退" onclick="javascript:window.history.back();" /> </body> </html>
点击按钮有前进后退效果
<!DOCTYPE html> <html lang="en"> <script> console.log(window.history); //在地址栏加上?id=数字,会发现控制台的长度变化 console.log(window.screen.width); console.log(window.screen.height); alert(window.document); </script> <head> <meta charset="utf-8"> </head> <body> <input type="button" value="前进" onclick="javascript:window.history.forward();" /> <input type="button" value="后退" onclick="javascript:window.history.back();" /> </body> </html>
觉得可用,就经常来吧!Javascript技巧 脚本宝典 欢迎评论哦! js技巧,巧夺天工,精雕玉琢。小宝典献丑了!