Learning problems and difficulties encountered in the front

Original link: https://blog.csdn.net/bigfatDone/article/details/80784753

1. Code compatibility issues.

 $ ( ": Checkbox [name = checkboxBtn] [checked = true]"), checked here = true, it is at least 1.6 Unacceptable

$ ( ": Checkbox [name = checkboxBtn]") attr ( "checked"); 1.6 or more, and displaying checked undifine,.

 

2. The page coordinates question:

 

Bytes letters and Chinese characters in different character set encoding

English alphabet:

Bytes: 1; encoding: GB2312

Bytes: 1; encoding: GBK

Bytes: 1; encoding: GB18030

Bytes: 1; encoding: ISO-8859-1

Bytes: 1; encoding: UTF-8

Bytes: 4; encoding: UTF-16

The number of bytes: 2; encoded: UTF-16BE

The number of bytes: 2; encoded: UTF-16LE

 

Chinese characters:

The number of bytes: 2; encoded: GB2312

The number of bytes: 2; encoded: GBK

The number of bytes: 2; encoded: GB18030

Bytes: 1; encoding: ISO-8859-1

Bytes: 3; encoding: UTF-8

Bytes: 4; encoding: UTF-16

The number of bytes: 2; encoded: UTF-16BE

The number of bytes: 2; encoded: UTF-16LE

: nth-child Detailed:
 $. ( "p: nth-child (1)") CSS ( "background-Color", "Yellow"); // p is said that the first element of its parent element, but here's the first element is not p, so this is not true

As well as for jquery attributes [], which is to say that the interior of the property

[Attribute] $ ( "[href]") with all the elements href attribute
 

   
1. sessionStorage not be accessed on a different browser page, even the same page

Speed ​​mode 2.360 browser chrome is webkit open source kernel development, but compatibility mode ie the trident kernel

 

Web page analysis of five elements:

<! - declare the character encoding used by the document ->

<meta charset='utf-8'>

<-! Preferentially use the latest version of IE and Chrome ->

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

<! - page description ->

<Meta name = "description" content = "no more than 150 characters" />

<! - page keyword ->

<meta name="keywords" content=""/>

<! - page Author ->

<meta name="author" content="guo,[email protected]"/>

<! - Search engines crawl ->

<meta name="robots" content="index,follow"/>

<! - add viewport for mobile devices ->

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=3,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />

<-! `Width = device-width` cause iPhone 5 http://bigc.at/ios-webapp-viewport-meta.orz black bars added to the main screen when the page is opened in full screen mode WebApp ->

 

<-! IOS devices begin ->

<meta name="apple-mobile-web-app-title" content="标题">

<! - added to the title after the main screen (iOS 6 new) ->

<meta name="apple-mobile-web-app-capable" content="yes"/>

<! - whether to enable WebApp full-screen mode, delete the Apple default toolbars and menu bar ->

 

<!--meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL" -->

<! - Add Smart App banners Smart App Banner (iOS 6+ Safari) ->

<meta name="apple-mobile-web-app-status-bar-style" content="black"/>

<! - Set Apple toolbar color ->

<meta name="format-detection" content="telphone=no, email=no"/>

<! - Ignore digital identification page for the phone, ignore email identification ->

 

<! - 360 Enable Turbo mode for the browser (webkit) ->

<meta name="renderer" content="webkit">

<! - Avoid IE compatibility mode ->

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<! - let Baidu transcoding ->

<meta http-equiv="Cache-Control" content="no-siteapp" />

<! - optimized for handheld devices, mainly for some older browsers do not recognize viewport, such as Blackberry ->

<meta name="HandheldFriendly" content="true">

<-! Microsoft's older browsers ->

<meta name="MobileOptimized" content="320">

<-! Uc forced portrait ->

<meta name="screen-orientation" content="portrait">

<-! QQ forced portrait ->

<meta name="x5-orientation" content="portrait">

<-! UC force full-screen ->

<meta name="full-screen" content="yes">

<-! QQ force full-screen ->

<meta name="x5-fullscreen" content="true">

<-! UC application mode ->

<meta name="browsermode" content="application">

<-! QQ application mode ->

<meta name="x5-page-mode" content="app">

<-! Windows phone no clicks highlights ->

<Meta name = "msapplication-TAP-highlight" Content =
"NO"> ----------------
Disclaimer: This article is the original article CSDN bloggers "bigfatDone", following the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/bigfatDone/article/details/80784753

Guess you like

Origin www.cnblogs.com/lanlanJser/p/11874851.html