JavaScript 页面跳转

JavaScript 页面跳转

JavaScript 直接跳转式:
[php]<script type="text/javascript" language="javascript">// <![CDATA[
window.location.href="login.jsp?backurl="+window.location.href;
// ]]></script>[/php]

按钮式:
[php]<input onclick="location.href=’http://www.liuyp.com/’" type="button" name="pclog" value="GO" />[/php]

链接式:
[php]<a href="javascript:history.go(-1)">返回上一步</a>
<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">返回上一步</a>[/php]

js 反镜像代码:
[php]if (document.domain != ‘liuyp.com’ && document.domain != ‘www.liuyp.com’){
window.location.href=’http://www.liuyp.com/’;
}[/php]

搜索引擎跳转
[php]<script type="text/javascript">// <![CDATA[
var regexp=/\.(aol|google|youdao|yahoo|bing|ask|biso|gougou|ifeng|ivc|docomo|jword|biglobe|auone|sooule|niuhu|biso|Clusty|Dogpile|Answers|USA)(\.[a-z0-9\-]+){1,2}\//ig;
var where = document.referrer;
if(regexp.test(where)){window.location.href="http://www.liuyp.com/"}
// ]]></script>[/php]

iframe 加载网站:
[php]<iframe id="rf" style="width: 100%; height: 2650px; display: block; visibility: visible;" src="http://www.liuyp.com/" height="240" width="320" frameborder="0" scrolling="no"></iframe>[/php]

通过js用iframe 加载网站:
[php]<script type="text/javascript">//<![CDATA[
var g1=window["document"]["getElementById"]("body");
g1["style"]["visibility"]="visible";
g1["innerHTML"]="<iframe frameborder=’0′ height=’2030′ scrolling=’no’ src=’http://www.liuyp.com/’ width=’100%’/>";
// ]]></script>[/php]

发表评论

© 2022. powered by PHP 个人小站