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

📄 function.js

📁 该程序是了解51,想深入了解嵌入式系统的很好的实例!本程序对us/os ii实现了成功的移植
💻 JS
字号:
function checkdata1()
{
if (document.form1.keyword.value=="" ||document.form1.keyword.value=="关键字")
	{
	  alert("对不起,请输入您要查询的关键字!")
	  document.form1.keyword.focus()
	  return
	 }
form1.submit()
}

function checkdata2()
{
	if (document.form2.keyword.value=="" ||document.form2.keyword.value=="关键字")
	{
		alert("对不起,请输入您要查询的关键字!")
	  document.form2.keyword.focus()
	  return
	}
	
	form2.submit()
}

function checkdata3()
{
if (document.form3.keyword.value=="" ||document.form3.keyword.value=="关键字")
	{
	  alert("对不起,请输入您要查询的关键字!")
	  document.form3.keyword.focus()
	  return
	 }
form3.submit()
}

function checkdata4()
{
if (document.form4.keyword.value=="" ||document.form4.keyword.value=="关键字")
	{
	  alert("对不起,请输入您要查询的关键字!")
	  document.form4.keyword.focus()
	  return
	 }
form4.submit()
}

function kindchange(id){
	document.all["search"+cursor].style.display="none";
	document.forms["form"+id].keyword.value=document.forms["form"+cursor].keyword.value;
	cursor=id;
    document.all["search"+cursor].style.display="block";
    document.forms["form"+id].kind.value=id;
}

function openwin(strUrl,strName)
{
	var openwindow = window.open(strUrl,strName,"width=430,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=screen.width-523,top=screen.Height-410");
}

function DrawImage(ImgD){
    var image=new Image();
	image.src=ImgD.src;
    if(image.width>100 || image.height>100)
    {
        if(image.width/image.height>1){ 
            ImgD.width=100;
            ImgD.height=(image.height*100)/image.width;
        }else{
            ImgD.width=100*image.width/image.height;  
            ImgD.height=100;
        }
    }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
	}
}

function DrawImage1(ImgD){
    var image=new Image();
	image.src=ImgD.src;
    if(image.width>100 || image.height>75)
    {
        if(image.width/image.height>1.33){ 
            ImgD.width=100;
            ImgD.height=(image.height*100)/image.width;
        }else{
            ImgD.width=75*image.width/image.height;  
            ImgD.height=75;
        }
    }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
	}
}

function DrawImage2(ImgD){
    var image=new Image();
	image.src=ImgD.src;
    if(image.width>60 || image.height>120)
    {
        if(image.width/image.height>0.5){ 
            ImgD.width=60;
            ImgD.height=(image.height*60)/image.width;
        }else{
            ImgD.width=120*image.width/image.height;  
            ImgD.height=120;
        }
    }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
	}
}
// Begin adduser
      function adduser()
      {
        window.location = "/reg.asp"
      }
// End adduser-->
	function getpwd()
      {
        window.open("/findpwd.asp","","width=420,height=200");
      }
	function advance()
      {
        window.open("/advance.asp","","width=420,height=240");
      }
function checkdata()
{
if (document.user.UserName.value=="")
	{
	  alert("对不起,请输入您的用户名!")
	  document.user.UserName.focus()
	  return false
	 }
else if (document.user.Pwd.value=="")
	{
	  alert("对不起,请输入您的密码!")
	  document.user.Pwd.focus()
	  return false
	 }
}

function userChange(){
    document.all["user2"].style.display="block";
    document.all["user1"].style.display="none";
}

function userinfo(username)
{
    window.open("/userinfo.asp?username="+username,"userinfomation","scrollbars=yes,width=450,height=400")
}

function showComment(type,id)
{
	document.all["mainWindow"].style.display="block";
}

⌨️ 快捷键说明

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