⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common.js

📁 一个经典的PID算法实例 很有参考价值 C语言实现
💻 JS
字号:
function doupload()
{
	uploading.style.visibility="visible";
}

function columnvisible()
{
	setcolumn.style.visibility="visible";
}

function columnhidden()
{
	setcolumn.style.visibility="hidden";
}


var flag=false;
function DrawImage(ImgD,imgW,imgH){
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0){
	flag=true;
	if(image.width/image.height>= imgW/imgH){
	 if(image.width>imgW){
	 ImgD.width=imgW;
	 ImgD.height=(image.height*imgW)/image.width;
	 }else{
	 ImgD.width=image.width;
	 ImgD.height=image.height;
	 }
	 ImgD.alt=image.width+"×"+image.height;
	 }
	else{
	 if(image.height>imgH){
	 ImgD.height=imgH;
	 ImgD.width=(image.width*imgH)/image.height;
	 }else{
	 ImgD.width=image.width;
	 ImgD.height=image.height;
	 }
	 ImgD.alt=image.width+"×"+image.height;
	 }
	}
	/*else{
	ImgD.src="";
	ImgD.alt=""
	}*/
	}


//鼠标滚轮-----------------------------start
var isdrag=false;
function img_zoom(e, o)    //图片鼠标滚轮缩放

{
  var zoom = parseInt(o.style.zoom, 10) || 100;
  zoom += event.wheelDelta / 12;
  if (zoom > 0) o.style.zoom = zoom + '%';
  return false;
}
function mouseover(){
                div1.border="1";
                div1.style.cursor="nw-resize";
}
function mouseout(){
                div1.border="0";        
}
function mousemove(){
        if(isdrag){
                div1.style.width=event.clientX;
                //div1.style.height=event.clientY;
        }
}
function mousedown(){
                div1.setCapture();
                isdrag = true;
                div1.onmousemove=mousemove;
}
function mouseup(){
        div1.releaseCapture();
        isdrag = false;
        //event.returnValue=false;
}
//鼠标滚轮-----------------------------start

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -