Test common JS demos

Source: Internet
Author: User
<SCRIPT type = text/JavaScript src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" /> </SCRIPT> // Google jqueryonclick = "Event. returnvalue = False ;" // Disable checkbox Firefox invalid encodeuricomponent () JS Chinese URL encoding utf8function addfav (t) {document. Write ('<a href = "'+ Window. Location. href +'" Title = "'+ document. Title +'" rel = "sidebar" onclick = "window. External. AddFavorite ( This . Href, This . Title ); Return   False ;" > '+ T +' </a> ');} // Add to favorites <SCRIPT type = "Text/JavaScript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" > </SCRIPT> <script language = "JavaScript" type = "text/JavaScript" src = "/templets/default/BCC/JS/jquery. Countdown. Min. js" > </SCRIPT> <SCRIPT> var liftofftime456 = new date ( "Maid 11:14:56" ); Var serverdate = new date ( "Maid 11:14:56"); Var localdate = new date (); var jtime = localdate-serverdate; // liftofftime456.setutcseconds (liftofftime456.getutcseconds () + math. round (jtime/1000); alert (jtime); $ (function () {$ ('# '). countdown ({alwaysexpire: True, layout: '{Hnn} {Sep} {Mnn} {Sep} {SNN}', until: liftofftime456, format: 'hms ', timezone: + 8, onexpiry: function () {liftoff ('000000') }}); </SCRIPT> <span id = "AA" > </Span> // JS countdown  $ (Function () {$ ( '# Leftmenu' ). Click (function () {$ ( '# Leftmenu'). Each (function () {$ (this). removeclass ( 'Tabon' ) ;}); $ (This). addclass ( 'Tabon' ) ;}) // Li Selector  Onclick = "document. Forms [ 'Alipaysubmit']. Submit (); "// image submission function showpic (file, IMG, imgname) {var fileobj = document. getelementbyid (File); var imgobj = document. getelementbyid (IMG); fileobj. value = imgname. value; If (imgname. files) {If (imgobj) imgobj. src = imgname. files [0]. getasdataurl (); // Firefox} else {If (imgobj) {imgobj. style. display = "NONE"; // ie document. getelementbyid (IMG + "_ Div "). filters. item ("DXImageTransform. microsoft. alphaimageloader "). src = imgname. value; document. getelementbyid (IMG + "_ Div "). filters. item ("DXImageTransform. microsoft. alphaimageloader "). sizingmethod = 'Scale';}}== Instance === <Div id = "picnamediv_div" style = "filter: progid: DXImageTransform. microsoft. alphaimageloader (sizingmethod = image); width: 160px; Height: 120px; display: block; overflow: hidden; display: inline; float: Left; "> <? PHP echo eip_image (eip_href_link ( 'Upload/none1.png '), '', '000000', '000000', 'Id =" picnamediv "name =" picnamediv "');?> </Div> //  Upload image Preview "Week" + "May 15, 1234". Split ("")[ New Date ("2011/2/2" ). Getday ()]  //  JS Judgment time <Script language = "JavaScript" type = "text/JavaScript">Function  Drawimage (imgd, fitwidth, fitheight ){  VaR Image = New  Image (); image. SRC = "Http://java.ccidnet.com/art/3539/20080625/imgd.src ;" If (Image. width> 0 & image. Height> 0 ){  If (Image. width/image. Height> = fitwidth/ Fitheight ){  If (Image. width> Fitwidth) {imgd. Width =Fitwidth; imgd. Height = (Image. Height * fitwidth)/image. width; }  Else  {Imgd. Width = Image. width; imgd. Height = Image. Height ;}}  Else  {  If (Image. Height> Fitheight) {imgd. Height = Fitheight; imgd. Width = (Image. Width * fitheight)/image. height; }  Else  {Imgd. Width = Image. width; imgd. Height = Image. Height ;}}}} <SCRIPT> //  Thumbnail <SCRIPT type = text/JavaScript src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" /> </SCRIPT> <SCRIPT >$ (function () {$ ( "<Div>" , {ID: 'test', text: 'This is a test ', "Class": "test" , Click: function () {$ (this). toggleclass ('test') ;}}). appendto ( "Body" ) ;}) </SCRIPT> // automatically generate <IFRAME src = "" Style = "width: 800px; Height: 536px; top: 0px; left: 0px; position: absolute; visibility: Inherit; Z-index:-1 ;" Frameborder = 0>
</Iframe> block select. You only need to add the following to the layer.CodeYou can ~ <IFRAME src = "" Style = "width: 800px; Height: 536px; top: 0px; left: 0px; position: absolute; visibility: Inherit; Z-index:-1; "frameborder = 0>
</Iframe>

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.