zoukankan      html  css  js  c++  java
  • 一些零星备忘。

    获取当前月的天数:

    1.javascript:

    var curMonthDays = new Date(d.getFullYear(), (d.getMonth() + 1), 0).getDate();

    2.c#:

    System.DateTime.DaysInMonth(int year,int month)

    移动div层:

    代码
    var drag_=false
    var D=new Function('obj','return document.getElementById(obj);')
    var oevent=new Function('e','if (!e) e = window.event;return e')
    function Move_obj(obj){
        
    var x,y;
        D(obj).onmousedown
    =function(e){
        drag_
    =true;
        
    with(this){
            style.position
    ="absolute";var temp1=offsetLeft;var temp2=offsetTop;
            x
    =oevent(e).clientX;y=oevent(e).clientY;
            document.onmousemove
    =function(e){
                
    if(!drag_)return false;
                    
    with(this){
                        style.left
    =temp1+oevent(e).clientX-x+"px";
                        style.top
    =temp2+oevent(e).clientY-y+"px";
                    }
                }
            }
            document.onmouseup
    =new Function("drag_=false");
         }
    }
  • 相关阅读:
    安装tomcat
    sed
    a'w'k
    dwr??
    tomcat-性能?
    windows清理命令
    markdown超链接怎么写?
    ※剑指offer系列19:二叉搜索树与双向链表
    剑指offer系列17:二叉搜索树的后序遍历序列
    剑指offer系列18:二叉树中和为某一值得路径
  • 原文地址:https://www.cnblogs.com/rain64531264/p/1671253.html
Copyright © 2011-2022 走看看