In the IE7,Using jqueryDisplay: $ ("#a"). attr ("Style", "");Hidden: $ ("#a"). attr ("style", "Display:none");But showing this method doesn't work in IE8.IE8Display: $ ("#a"). Removeattr ("style");Hidden: $ ("#a"). attr ("style", "Display:none");IE6, the weirdest, using Display:none can't hide the Select tagThe following two, tested, can be used in three versionsHidden: document.getElementById ("a"). style.display= "None";Display: document.getElementById ("a"). style.display= ""; ---This method
Bytearrayinputstream Bais = New Bytearrayinputstream (body); return new ServletInputStream () {@Override public int read () throws IOException {re Turn bais.read (); } @Override public Boolean isfinished () {return false; } @Override public Boolean isReady () {return false; } @Override public void Setreadlistener (Readlistener listener) {}}; }}And then take something from the InputStream and pull it. public static Jsonobject Receivepost (HttpServlet
Add a Google browser-specific kernel attribute style to the HTML or body (or you can add a CSS selector if you need to set a small text font object) such as the following CSS code:Html,body{-webkit-text-size-adjust:none;}Or. Divcss5{-webkit-text-size-adjust:none;}Note: If you use this property, the browser font will not be able to use the Zoom out function! (Just hold down the CTRL key to scroll up and down the middle mouse button)Html,body {-webkit-text-size-adjust:none;} //or a specific DIV.DI
Depending on the difference between FF and IE for some symbol recognition, we can define the styles separately for FF and IE, for example:Difference between IE6 and FF:Background:orange;*background:blue;Difference between IE6 and IE7:Background:green!important;background:blue;Difference between IE7 and FF:Background:orange; *background:green;Difference ff,ie7,ie6:Background:orange;*background:green!important;*background:blue;Note: IE can recognize *; standard browsers (such as FF) do not recogni
/* ** JSON Encoding of variables* @param mixed value to encode value, except for the resource type, can be any data type, the function can only accept UTF-8 encoded data* @return String returns the JSON form of value values */ functionJSON_ENCODE_EX ($value){if(Version_compare(php_version, ' 5.4.0 ', ' {$str= Json_encode ($value);$str=Preg_replace_callback("#\\\u ([0-9a-f]{4}) #i",function($matchs){return Iconv(' Ucs-2be ', ' UTF-8 ',Pack(' H4 ',$matchs[1]));},$str );return$str;}Else {returnJso
the operation. Returns true if the first parameter is greater than or equal to the second argument.
( )
[If! (IE 7)]
subexpression operators. Used in conjunction with the Boolean operators to create more complex expressions.Sub-expression operator. Used in with Boolean operators to create more complex expressions.
[If (GT IE 5) (LT IE 7)]
The AND operator. Returns true if all subexpressions evaluate to TrueAnd operator. Returns true if all sub-e
#条件声明 (explained in detail in another article) is also the most common way to solve IE compatibility#对于不同版本的IE相应的CSS规则, is also an alternative way.IE8 and/or next: After adding the 9 (\9) attributeIE7 or later: Add a property before adding *IE6: Add before attribute _. box {Background:gray;/* standard */background:pink\9;/* IE 8 and below */*background:green;/* IE 7 and below */_bac Kground:blue; /* IE 6 */}#条件声明里面, add the This method was invented by Paul Irish, using the corresponding IE class
Use the link as follows. After clicking in Chrome, the behavior is expected, but a new tag card will be opened under IE (according to reference, Firefox has the same problem).After looking for information, found to be resolved as follows.Block browser default event via onclick: or direct: The reason is that three browsers have different processing order for three properties.Chrome Order: onclick, href-and targetIE and Firefox order: href---target---
"FN ()" >does not appear as a link, b
document.getElementById (' ID name '); All browsers
document.getElementsByTagName (' tag name '); All browsers
Document.getelementsbyname (' name '); All browsers
Document.getelementsbyclassname (' class name '); //In addition to IE9 below, support
If you want to get the tag through the class name and are compatible with all browsers, you need to do the compatibility:1 /*2 * Function: Get a certain range of tag array by class name3 *
Only technically, to achieve the Web page grayscale, the safest way to deal with all the images directly, regardless of compatibility, regardless of efficiency. However, the workload is larger, switching back also laborious.
IE Series support CSS filter, a sentence filter:gray; solves all the problems. However, as we all know, IE is famous for its inefficiency, you will find that the speed is significantly lower after opening. And, most deadly, is not valid under other browsers.
Is there a w
Most web developers are likely to be familiar with the solution that uses the page portion of the anchor chain to jump to. You can set the anchor connection for a specific name property and use the HREF value as the hash symbol to skip the page. This effect, when you need to list a very long dataset, is very practical, such as a FAQ page, a question in the form of often use this effect, but the page jump for visitors sometimes is not good friendly, because he clicks directly to jump, unfamiliar
The example in this article describes the advanced drag method that JS implements to be compatible with various browsers. Share to everyone for your reference, specific as follows:
More readers interested in JavaScript-related content can view the site topics: "JavaScript switching effects and tips summary", "JavaScript Search Algorithm Skills Summary", "JavaScript animation effects and tips summary", " JavaScript error and debugging skills
interaction of a parent-child page relies solely on the parent keyword (which, in the previous approach, relies not only on parent, but also on Contentwindow, window, and other indeterminate keywords, and most importantly, the support of the parent is very good)
2.window object unification, reduce the request for each use of the reference chain, improve the running speed
3. The most important point: The code is much easier to write.
The above is a small set to introduce the JavaScript IFRAME
to the button's click Action, through post submission, for the user input is a text box, the user input to fill in after the item, directly press ENTER, it is equivalent to press the button, At the beginning did not pay attention to this problem, a press RETURN, jump to another page, a lot of data, just found to block the browser's default behavior, because the default behavior is submit form, then your JS will not be implemented. So cancel the default behavior first. Then execute your JQ to su
window.open () is a bullet window ads, but because the browser's interception mechanism is more and more perfect, open the chance of getting lower.
Before in Baidu saw many kinds of writing, such as:
To trigger the Click event of a button through JS
To trigger a form's submit event through JS, and the form's target is set to _blank
But after my tests, the findings are no longer compatible.
So I thought of the following approach:
This article illustrates the way JS reads XML file data and displays the data in table Form. Share to everyone for your reference, specific as follows:
First look at the XML file:
aspx page code:
The above JS operation mainly avoids using childnodes (because Firefox sometimes appears childnodes[0] get is "\ n" instead of the first child node we want, this oneself can go to try, anyway I encountered this situation), so that can be compat
The first: Eval method parsing
[JavaScript] view plain copy function Strtojson (str) {var json = eval (' + str + ') '); return JSON; }Second: form of new function
[JavaScript] view plain copy function Strtojson (str) {var json = (new function ("return" + str)) (); return JSON; }Third: Using Global JSON objects
[JavaScript] view plain copy function Strtojson (str) {return json.parse (str); }
The Top 2 compatible browsers are not supported by the third
Differences from Perl PCRE function PCRE Patterns PHP manual Schema Syntax
(No version information available, might only being in SVN)
Schema syntax-syntax explanation for Perl compatible regular expressions
The PCRE library is a set of functions that implement regular expression pattern matching with the same syntax and semantics as Perl 5, but there are a few differences (see below). The implementation of the current PCRE is in accordance with
1, the use of max-width,max-height so that the proportion of the picture automatically scaling, code:
The code is as follows
Copy Code
img{max-width:330px;max-height:150px;}
Because IE6 does not support CSS max-width,max-height, JavaScript scripts are needed to control size in IE6.
2, with JavaScript script compatible IE6, code such as:
The code is as follows
Copy Code
var img_width
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.