📄 default.js
字号:
//自动缩放代码///////////////////////////////
function ReImgSize(obj){
for (i=0;i<document.images.length;i++)
{
if (document.all){
if (document.images[i].width>500)
{
document.images[i].width="500"
document.images[i].outerHTML='<a href="'+document.images[i].src+'" target="_blank" title="在新窗口打开图片">'+document.images[i].outerHTML+'</a>'
}
}
else{
if (document.images[i].width>400) {
document.images[i].title="在新窗口打开图片"
document.images[i].style.cursor="pointer"
document.images[i].onclick=function(e){window.open(this.src)}
}
}
}
}
function initJS(){
ReImgSize() //自动缩放代码
}
//缩放字体大小////////////////////////////
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
if(curfontsize>8){
document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
}
}
function fontZoomB(){
if(curfontsize<64){
document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
}
}
var Cookie = {
setCookie : function(name, value)
{
document.cookie = name + "=" + value + ";";
}
};
function getcookie(value)
{
Cookie.setCookie("skincookie", value);
window.location.reload();
}
function openzd(divid)
{
var zddiv=document.getElementById(divid);
var zdlink=document.getElementById('linkzd'+divid);
if(zddiv.style.display!="none")
{
zddiv.style.display="none";
zdlink.style.background="url(images/openzd.gif) no-repeat";
}else{
zddiv.style.display="block";
zdlink.style.background="url(images/closezd.gif) no-repeat";
}
}
//=========================================
//表单判断
//=========================================
function CheckForm(obj){
if(document.form.userid.value=="")
{
alert("用户名不能为空");
document.form.userid.focus();
return false;
}
if(document.form.password.value=="")
{
alert("密码不能为空");
document.form.password.focus();
return false;
}
return true;
}
function CheckForm1(obj){
if(document.form1.pl_content.value=="")
{
alert("评论内容不能为空");
document.form1.pl_content.focus();
return false;
}
return true;
}
function cc(){
IframeID.document.body.innerHTML=document.all("content").value;
document.all("content").value="";
}
function openEditScript(url, width, height){
var Win = window.open(url,"openEditScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -