求大神指点
What is the use of history.length?? Give a few examples - PHP Chinese website Q&A - What is the use of history.length?? Give a few examples - PHP Chinese website Q&A
Take a look around and learn.
使得window.history.length的值可以判断是否存在上一页。但是这个值在不同浏览器中有不同的标准。IE是用0表示没有上一页,其它标准浏览器则是至少都为1,大于1表示有上一页。可以通过这个判断是否可以返回前一页。
What is the use of history.length?? Give a few examples - PHP Chinese website Q&A - What is the use of history.length?? Give a few examples - PHP Chinese website Q&A
Take a look around and learn.
使得window.history.length的值可以判断是否存在上一页。但是这个值在不同浏览器中有不同的标准。IE是用0表示没有上一页,其它标准浏览器则是至少都为1,大于1表示有上一页。可以通过这个判断是否可以返回前一页。