Continuous Operation HtmlElement Object graphic solution _javascript skills

Source: Internet
Author: User
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; Charset=utf-8 "/> <title> Untitled document </title> <script language=" javascript "type=" Text/javascript "> 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 ("<" + p + "Name= '" + N + "' >"); }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<n.plugins.length;ii++) {if (n.plugins[ii].name). IndexOf (' Shockwave Flash ')!=-1) {f=n.plugins[ii].description.split (' Shockwave flash ') [1]; Break else if (window. ActiveXObject) {for (Var ii=10;ii>=2;ii--) {try {var fl=eval ("New ActiveXObject" (' Shockwaveflash.shock Waveflash. " +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); </script> </pead> <body> </body> </ptml> <script language= "JavaScript type=" text/j Avascript "> var width = 200; var height = 200; var ooutline = jobj. $c ("DIV"). $appendTo (Document.body). $css ("width", Width + "px"). $css ("height", height + "px"). $att (" Class "," Ooutline "). $att (" ClassName "," Ooutline "). $css (" BackgroundColor "," #cc6600 "); Alert (JObj.browser.Name + "" + JObj.browser.fullVersion) </script>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

510) {this.resized=true;this.style.width=510;} " >

510) {this.resized=true;this.style.width=510;} " >

510) {this.resized=true;this.style.width=510;} " >

510) {this.resized=true;this.style.width=510;} " >

510) {this.resized=true;this.style.width=510} "resized= true" >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.