location.href = '/m/';//How to write the current page url code
一个字
一个字 2019-09-03 17:23:55
0
3
1406

<script type="text/javascript">

(function(){

    var sUserAgent = navigator.userAgent;

    if (sUserAgent.indexOf('Android') > -1 && sUserAgent.indexOf('Mobile') > -1 || sUserAgent.indexOf('iPhone') > -1 || sUserAgent.indexOf('iPod') > -1 || sUserAgent.indexOf('iPad') > -1 || sUserAgent.indexOf('Symbian') > -1 || sUserAgent.indexOf('IEMobile') > -1)

{

document.write(location.search);

location.href = '/m/';//�%8

一个字
一个字

reply all(1)
秋香姐家的小书童
//获取当前窗口的
Urlvar url = window.location.href;
//结果: 
获取当前窗口的主机名
var host = window.location.host;
//结果:
localhost:61768
//获取当前窗口的端口
var port = window.location.port;
//结果:61768
//获取当前窗口的路径
var pathname = window.location.pathname;
//结果:
/Home/Index
//获取当前文档的
Urlvar URL = document.URL;
//结果:
http://localhost:61768/Home/Index?id=2&age=18
//获取参数
var search = window.location.search;
//结果:
?id=2&age=18


  • reply Dear, I can’t write, please write.
    一个字 author 2019-09-03 20:39:19
  • reply Still here,
    一个字 author 2019-09-10 10:00:14
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template