javascript.js
来自「易联多用户Blog网站程序源码(多层模式) 包括DAL、BLL、Comm」· JavaScript 代码 · 共 35 行
JS
35 行
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
function Read(url)
{
window.open(url, "", "menubar=yes, toolbar=yes, location=yes, status=yes, channelmode=yes, resizable=yes, scrollbars=yes");
}
var MAX_IMAGE_WIDTH = 518;
function OnClick(image)
{
if(image.tag == "true")
{
window.open(image.src, "", "menubar=yes, toolbar=yes, location=yes, status=yes, channelmode=yes, resizable=yes, scrollbars=yes");
}
}
function SetAttribute(image)
{
if(image.offsetWidth > MAX_IMAGE_WIDTH)
{
var height = MAX_IMAGE_WIDTH * image.offsetHeight / image.offsetWidth;
image.style.cursor = "hand";
image.style.width = MAX_IMAGE_WIDTH;
image.style.height = height;
image.tag = "true";
image.alt = "请单击查看原始尺寸的图片。";
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?