zoukankan      html  css  js  c++  java
  • 【js】text

    document.write(document.lastModified) 网页最后一次更新时间

    //document.onmousedown = function(){ alert('document.onmousedown')};
    //双击鼠标产生事件
    document.ondblclick = function(){ alert('document.ondblclick')};
    //单击鼠标产生事件

    var a = Math.random() * 10;
    //随机涵数,只能是0到1之间的数,如果要得到其它数,可以为*10,再取整
    alert(a);
    alert(Math.floor(a));
    //将对象number转为整数,舍取所有小数

    document.writeln("返回当前浏览器名称:" + navigator.appName);
    document.writeln("返回当前浏览器版本号:" + navigator.appVersion);
    document.writeln("返回当前浏览器代码名字:" + navigator.appCodeName);
    document.writeln("返回当前浏览器用户代标志:" + navigator.userAgent);

    var a = "hello world!";
    alert(a.substring(6));

    onLoad当网页打开,只能书写在body中

    document.referrer 上一页的地址,本地路径无效

  • 相关阅读:
    LeetCode 4 :Majority Element
    LeetCode 3 :Min Stack
    Oracle操作4
    plsql安装教程
    java Date与String互相转化
    Oracle操作3
    Oracle操作2
    Oracle操作
    Oracle11g修改密码
    Visual Studio2013完全卸载
  • 原文地址:https://www.cnblogs.com/jzm17173/p/2497474.html
Copyright © 2011-2022 走看看