js读取ip地址域名

来源:互联网 发布:赛尔网络华中科技大学 编辑:程序博客网 时间:2024/05/29 18:32
 AddScript:function(even,action){            jQuery.getScript('http://pv.sohu.com/cityjson',function(){                var data={};                var IP = returnCitySN["cip"];                var City = returnCitySN["cname"];                var Domain=decodeURI(decodeURI(window.location.href));                data.IP=IP;                data.City=City;                $.ajax({                    type:'POST',                    url:'',                    data:data,                    success:function(response,stutas,xhr){                    }                });             });        }        /**获取当前时间并调整格式**/        Istime: function() {            var now = new Date(),                y = now.getFullYear(),                m = now.getMonth() + 1,                d = now.getDate(),                h = now.getHours(),                min = now.getMinutes(),                s = now.getSeconds(),                time = y + '/' + m + '/' + d + ' ' + h + ':' + min + ':' + s;                return time;        }
0 0
原创粉丝点击