Reprint, please indicate the source // detection file extension Function EUWCHECKEXT (PATH); var Cext = extlist.indexof (" EXT " , "); If (ext ==") Return -1; if (Cext) {return 1;} else {return 0;}} // acquire file extension Function getFileExt (path) {var TMP = path; TMP = tmp.substring (".lastIndexof (". ") 1); return tmp.touppercase ();} // Operating style Function init (a) {var styletext1 ="; StyleText1 = "Font-Family: Arial Verdana; "; Styletext1 =" font-size: 18pt; "Styletext1 =" font-weight: bold; "; StyleText1 =" font-style: italic; "; StyleText1 =" Color: # 33cc00; "; // styletext1 =" background-color: # cccc00; "; Styletext1 =" Filter: Dropshadow (color = # 000000, offx = 1, offy = 1, posTIVE = 0); "; tdtmp.style.csstext = Styletext1;}
// Paste before filtering clipboard data function euwcoloronbeforepaste (objcolor) {ClipboardData.setdata ('text', clipboardData.getdata ('text'). Replace (/ [^ a-FA-F0-9] / g, ') .touppercase ());} // Color value input function euwcoloronkeyup (objcolor) {
Objcolor.Value = objcolor.value.Replace (/ [^ # a-FA-F0-9] / g, ''). TouPpercase ();
}
// setTimeout () Application Function LoopShow (Name) {xxx.location = "a.jpg"; setTimeout; "LOOPSHOW (" Name ");", 100);} // Digital input function economionnumonkeyup (obj) { Obj.value = obj.value.Replace (/ [^ 0-9.] / g, ''). Touppercase ();
// Scales zoom image var loadNum = 0; var loadTimes = 3; checkshowsize = false; function showsize () {//document.upload.file1.value = trim (Document.upload.file1.val); document.all. View.src = document.upload.file1.Value; //alert (Document.all.View.Height "x" Document.All.View.width "->" Document.all.View.FileSize); var diskuse = 5190970 var quota = 5242880 var maxfilesize = 512000; var showimg = new Image ();. Image.create (22,22) showimg.src = document.upload.FILE1.value; alert (showimg.fileSize); if (showimg.filesize> 0) {if (showimg.filesize> maxfilesize) {alertmsg = "The picture you selected is greater than" maxfilesize ", the current byte number =" showimg.FileSize; Return False;}
IF (Showimg.Filesize> Quota - Diskuse) {alertmsg = "The picture files you selected are too large, or the album is full;}
if (showimg.width> 100) {alert (showimg.width); var ori_w = showimg.width; var ori_h = showimg.height; showimg.width = 100; showimg.height = ori_h * showimg.width / ori_w;}
IF (Showimg.Width <5 || Showimg.Height <5) {showimg.width = showimg.height = 150;}
//document.all.view.src = showimg.src; document.all.view.style.width = showimg.width; document.all.view.style.height = showimg.height; checkShowSize = true; return true;} Else if (loadingnum
IF (YPosition <0) {yposition = 0;}} theproperty = "width =" width "," "height =" height "," "screenx =" xposition "," // Netscape "Screeny =" YPosition "," // Netscape "left =" xposition "," // ie "TOP =" YPosition ","; // ie
Theproperty = theproperty "location = 0," "menubar = 0," "resizable = 0," "scrollbars = 1," "status = 0," "Toolbar = 0," "HotKeys = 0 , ";", ' OtherProperty; WinObj = WINDOW.OPEN (URL, WinName, THEPROPERTY); if (URL == "about: blank") {WinObj.Document.writeln (" loading ..... font> ");} Winobj.focus (); return winobj;} // give a maximum high and wide, get zoom ratio function EuwResizeRatio (maxWidth, maxHeight, objImgTmp) {var hRatio; var wRatio; var ratio = 1; var maxHeight; var maxWidth; var width = objImgTmp.width; var height = objImgTmp.height; wRatio = EuwStr2Float (maxWidth / width, 2); Hratio = EUWSTR2FLOAT (Maxheight / Height, 2); IF (Wratio <1 || Hratio <1) {if (Wratio <= Hratio) Ratio = Wratio else ratio = Hratio} Return Ratio;} // Improvement Version, Combined with SETTIMEOUT transmission parameter practice (this method in script block) Function EuwResizERATIO (MaxWidth, Maxheig) HT, Objimgtmp, Srcimg) {var Hratio; Var = 1; var iskernel = true; if (objimgtmp == null) {iskernel = false}; if (iskernel &&bjimgtmp.width == 0) {iskernel = False}; var width = 0; var height = 0; if (iskernel) {width = objimgtmp.width; height = Objimgtmp.Height; Wratio = EuWStr2float (MaxWidth / Width, 2); Hratio =