Home> Web design tutorial
All Dreamweaver tutorial Javascript tutorial HTML tutorial CSS tutorial Experience and skills DHTML tutorial Web effects WEB standardization
Web design tutorial
  • JS obtains CSS attribute value code in Class of a certain element

    JS obtains CSS attribute value code in Class of a certain element

    How to obtain the MARGIN, PADDING, Height, Border, etc. in DIV. You may say that you can directly obtain it with Document.GetelementByid ("ID"). Style.margin. But what you said can only get the style written directly in the label
    2025-02-09
  • Method of transferring values ​​between JS parent page and child page

    Method of transferring values ​​between JS parent page and child page

    1. The subpage is when the parent page pops up through window.open. If the subpage needs to pass the value to the parent page, just add window.opener in front of the document. Such as: 1. Parent page code:
    2025-02-09
  • The time conversion in JS -millisecond transition into a sample code for the date time

    The time conversion in JS -millisecond transition into a sample code for the date time

    JS millisecond time conversion to the date time copy code is as follows: Var Oldtime = (New Date ("2011/11/11 20:10:10"). Gettime (); // Most of the milliseconds are divided by milliseconds. With 365*24*60*60 & 1000, turn it back like this
    2025-02-09
  • Add the sample code for the specified element

    Add the sample code for the specified element

    Copy the code code as follows: // Cover layer $ j ("<div id='shade'></div> ") .css ({Position: 'Absolute', TOP: 0, Left: 0, BackgroundColor:"#808080 ", OPACIT
    2025-02-09
  • JS finds all the picture addresses in a certain element

    JS finds all the picture addresses in a certain element

    Copy code code as follows: Function Findimg () {var charimg = document.all ("chartimg"). GetelementsBytagname ("IMG"); VAR Imgurls = ""; for
    2025-02-09
  • JS webpage countdown in real time to accurate to seconds

    JS webpage countdown in real time to accurate to seconds

    A very useful JS countdown! The webpage countdown in real time, accurate to second -level, the same as the countdown of the number of days. JS countdown is generally used for group purchase of mall website, special sale, many places can be used! Hope to h
    2025-02-09
  • JS determines whether form input is empty (sample code)

    JS determines whether form input is empty (sample code)

    Copy the code as follows: //Remove spaces on both sides of the input string function trim(s) { var count = s.length; var st = 0; // start var end = count-1; // end if (s ==
    2025-02-09
  • For details

    For details

    Before the deep discussion of the form verification, let's think about the true meaning of the form verification of the form. As far as its core is concerned, form verification is a system that detects invalid control data for end users and mark these
    2025-02-09
  • Delivery Meta tags

    Delivery Meta tags

    The Meta tag is usually an important HTML label in the HTML web source code. Meta tags are used to describe the attributes of a HTML web document, such as authors, date and time, web description, keywords, page refresh, etc. 1. Viewportxml/html code Copy
    2025-02-09
  • js sample code for paginating article content

    js sample code for paginating article content

    Article display code in Thinkphp: Copy the code as follows:<div id="showContent"> {$article.content|htmlspecialchars_decode}</div>
    2025-02-09
  • HTML increases page loading speed method

    HTML increases page loading speed method

    (1) Reduce the request of HTTP. (Consolidated resource files and picture elves; (2) Put the CSS head and put JavaScript to the end of the body label; (3) define the width and height of the picture; And HREF attribute, in html
    2025-02-09
  • JS lazy loading speeds up page opening sample code

    JS lazy loading speeds up page opening sample code

    First, the JS lazy loading code is as follows: Copy the code as follows:<script language="JavaScript" src="" id="my"></script><script language="JavaScript"> setTimeou
    2025-02-09
  • JavaScript Form Verification Example (JavaScript Verification Email)

    JavaScript Form Verification Example (JavaScript Verification Email)

    These typical form data verified by JavaScript are: Do users fill in the required items in the form? Is the mail address entered by the user is legal? Has the user entered a legal date? Do users enter text in Numeric Field? The following functions below (
    2025-02-09
  • Summary of the three common methods of JS array heavy

    Summary of the three common methods of JS array heavy

    The first is a more conventional method: 1. Build a new array storage result 2. Take a element from the original array in the form cycle, compare the comparison with the result array with this element cycle. The element is stored in the result array Code
    2025-02-09
  • Use JavaScript to open the modal dialog box (sample code)

    Use JavaScript to open the modal dialog box (sample code)

    1. Standard method Copy code code as follows:<script type="text/javascript"> function openWin(src, width, height, showScroll){ window.showModalDialo
    2025-02-09