The script tag should be put in the position

  Generally placed position: <head> tag within, <body> tags within, <body> After the tag (label recommendations on the body, help to optimize the page, the page configuration to optimize the speed of loading)

  The 1. <head> tag: js externally introduced document or page elements is not directed to the operation js code block.

  2. <body> tags inside: the discharge line which are, as long as the operating element on the line below.

  3. <body> tags after: The recommended location, may be an external file may be incorporated js code pattern of operations. (In fact, this is placed in the body tag, manual funny.)

  

 

Guess you like

Origin www.cnblogs.com/angle-xiu/p/11312164.html