2018-06-30 JS Event

A. JS Code loading time1.DOM loading completed, the JS code is placed under the body can be;2. The page resource is loaded ( window). onload (function () {});3.jQuery implementations such as DOM load complete run-$ (function () {}) or $ (document).

Problems encountered in HTML forms

Originalhttps://www.jianshu.com/p/4466b8294007Outline1, form submission method get and post difference2, JS cannot assign the value of the file type of input3. JS gets the value in input why is the string always4. Alternative settings for read-only

JQuery Get page Width height

In the case of no scroll bars (the page aspect ratio is smaller than the viewable area):The width and height methods of $ (document) and $ (window) all get the same value, which is the width height of the viewable area.That is, $ (document). Width ()

Webfrom Local Refresh

I've been searching the internet for a long time to find a wayVery simple " server " id=" ScriptManager1 > " updatepanel1 " runat=" Server >// Here, put the control you want to refresh locally " ddlbig "/>" Span style= "COLOR: #00800

02-css Selector

CSS selector: 1. Basic selector 2. Advanced SelectorThe basic selector contains:1. Tag SelectorTag Selector can select all of the label elements, such as Div,ul,li, p, etc., regardless of how deep the tag is hidden, can be selected, select All, not

Vue Video.js Use

Plugin GitHub Address: https://github.com/videojs/video.jsThis way, make a switch. The resolution record of the Vue URL The. $nextTick (() = {let u = This.res.videoResult.videoPath document.getElementById (' Video_source ').

Talking about the dependency of the PHP object

Methods of constructing functions1PHP2 //defines a class in which the following classes rely on methods within this class3 classPlay4 {5 Public functionplaying ()6 {7 Echo"I can playing";8 }9 }Ten One classVideo A { -

CSS implementations are displayed with ellipses after exceeding their length

Style:{width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}DescriptionWhite-space:nowrap guarantees that text content is not wrapped automatically, and if the extra content is bursting horizontally in the cell.Overflow:hidden

PHP design mode-Enjoy meta mode

Use shared technology to effectively support a large number of fine-grained objectsThe change of the sharing mode is the storage cost of the object.Main roles in the enjoy meta-mode:Abstract enjoy meta (Flyweight) Role: This role is a superclass of

PHP design mode-proxy mode

Proxy mode provides a proxy for other objects to control access to this object. Use proxy mode to create a proxy object that controls access to the target object (the target object can be a remote object, create an expensive object, or an object

PHP design mode-policy mode

The policy model is primarily intended to allow the customer class to better use certain algorithms without needing to know their specific implementations._strategy = $strategy; Public Function handle_question () {$this->_strategy->do_method (); }

PHP design mode-Adorner mode

Adorner mode allows us to dynamically add different rows to and from an object, depending on the runtime's different scenarios_component = $component; Public function operation () {$this->_component->operation (); }}class Concretedecoratora

PHP design mode-compositing mode

The combination mode (Composite pattern) is sometimes called the partial-whole pattern, which is used to group objects into a tree structure to represent a "partial-whole" hierarchical relationship. The combined mode makes the user consistent with

PHP design mode-prototype mode

Sometimes, some objects need to be initialized multiple times. In particular, if initialization takes a lot of time and resources to pre-initialize and store these objects, prototype mode is used:_name = $name;} Public Function copy () {return

PHP design mode-Bridging mode

Separating the part of the abstraction from its implementation, so that they can be independently abstracted and separated from its implementation, that is, the abstract class and its derived classes are used to implement their own objectsBridging

thinkphp Development Model

TP Framework has two modes: Development mode (call mode), Production mode (run mode)Define (' App_debug ', true); Debug ModeDefine (' App_debug ', FALSE); Run mode not write is also run modeDebug mode: File load more, there is error, loading speed

js--Local Storage

1. Cookie capacity is small: 4k, carry the transmission in the same origin HTTP request, occupy the bandwidth, have the date limit title 2. Localstorage capacity is larger: 5M, will not be carried when requested, sharing in all

JSP reference Template

DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd ">% @pagelanguage= "Java"pageencoding= "UTF-8"%>% @taglibprefix= "S"URI= "/struts-tags"%>% @pageImport= "com.ehe.constant.*"%>HTML>Linkhref=

CSS3 Making Web Animations

I. CSS3 deformationCSS3 deformation is a collection of some effectssuch as pan, rotate, zoom, tilt effectEach effect can be called a warp (transform), which can manipulate the elements to translate, rotate, scale, tilt, and so on, respectively.Two.

Native JS and jquery use Jsonp to get "Current weather information", respectively.

Skill points to be mastered:JSONP, cross-domain correlation, and so on.The following two types of code can be run directly.1. Using Native JS:DOCTYPE HTML>HTMLLang= "en">Head> MetaCharSet= "UTF-8"> title>Titletitle>Head>Body> PID= "Cur_year"

Total Pages: 10629 1 .... 9005 9006 9007 9008 9009 .... 10629 Go to: GO

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.