Home > Web Front-end > JS Tutorial > Continuous operation of HTMLElement object graphics and text solutions_javascript skills

Continuous operation of HTMLElement object graphics and text solutions_javascript skills

WBOY
Release: 2016-05-16 19:05:48
Original
967 people have browsed it

[Ctrl A select all Note:
If you need to introduce external Js, you need to refresh to execute
]

Continuous operation of HTMLElement object graphics and text solutions_javascript skillsContinuous operation of HTMLElement object graphics and text solutions_javascript skills

Continuous operation of HTMLElement object graphics and text solutions_javascript skills var JObj = {}; (function($){ $.$ = function(p){ var obj = typeof(p) == "object" ? p : document.getElementById(p); assignFn(obj); return obj; } $.$appendTo = function(f,p){ var obj = p ? $.$(p) : this; $.$(f).appendChild(obj); assignFn(obj); return obj; } $.$c = function(p,n){ var obj; try{ obj = document.createElemnet(""); }catch(e){ obj = document.createElement(p); obj.name = name; } assignFn(obj); return obj; } $.$att = function(k,v,p){ var obj = p ? $.$(p) : this; obj.setAttribute(k,v); obj[k] = v; obj.$att = $.$att; assignFn(obj); return obj; } $.$css = function(k,v,p){ var obj = p ? $.$(p) : this; obj.style[k] = v; obj.$css = $.$css; assignFn(obj); return obj; } var fv = function(){ var f="-1",n=navigator; if (n.plugins && n.plugins.length) { for (var ii=0;ii=2;ii--) { try { var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');"); if (fl) { f=ii + '.0'; break; } }catch(e) {} } } if(f == "-1") return f; else return f.substring(0,f.indexOf(".")+2) } $.browser = {}; (function($){ //Notice : Firefox ,NS can't use property: name (case sensitive)! Because it's a hold field ,and it's values is anonymous. var n_ = navigator,s_ = screen; var b = n_.appName; var ua = n_.userAgent.toLowerCase(); $.Name = "Unknow"; $.safari = ua.indexOf("safari")>-1; // always check for safari & opera $.opera = ua.indexOf("opera")>-1; // before ns or ie $.firefox = ua.indexOf('firefox')>-1; // check for gecko engine $.ns = !$.firefox && !$.opera && !$.safari && (b=="Netscape"); $.ie = !$.opera && (b=="Microsoft Internet Explorer"); $.Name = ($.ie ? "IE" : ($.firefox ? "Firefox" : ($.ns ? "Netscape" : ($.opera ? "Opera" : ($.safari ? "Safari" : "Unknow"))))); switch($.Name){ case "Opera": $.fullVersion = ua.substr(ua.indexOf("opera") + 6); break; case "IE": $.fullVersion = ua.substr(ua.indexOf("msie") + 5).split(";")[0]; break; case "Firefox": $.fullVersion = ua.substr(ua.indexOf("firefox") + 8); break; case "Safari": $.fullVersion = ua.substr(ua.indexOf("version") + 8).split(" ")[0]; break; case "Netscape": $.fullVersion = ua.substr(ua.indexOf("netscape") + 9); break; default: $.fullVersion = "-1"; } $.version = parseFloat($.fullVersion); })($.browser); var fn = {}; (function($,$$){ var o; for(o in $$){ if(eval("$$." + o) instanceof Function) $[o] = o; } })(fn,$); var assignFn = function(p){ if(!p) return; var o; for(o in fn){ p[o] = $[o]; } } })(JObj); 510){this.resized=true;this.style.width= 510;}" resized="true">

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template