[Source code download: http://download.csdn.net/source/3526786] Introduction
Here, I'll introduce ATL support for using ActiveX controls in a dialog box. Because ATL specializes in handling ActiveX controls, WTL does not involve other auxiliary classes. However, the ATL method that uses ActiveX controls is very different from MFC, so it needs to be highlighted. I'll explain how to use an ActiveX control and handle events to develop a program that does not lose functionality compared to programs
Symptom (s): When setting a value for an element's InnerHTML, if the provided HTML code contains a JS script, many times these scripts are invalid or valid on some browser, but are not valid on other browsers.
Reason: Different browsers have different ways of handling scripts that are inserted into InnerHTML. After practice, summed up as follows:
For IE, first, the script tag must take the defer attribute
Although a seemingly very good topic, but this article can be said to be completely egg pain (such as I ~) a Pastime ~ usually developers have their own way of relaxation. In the Genesis Altar, one of XD asked a question about the border, so he was going to figure it out. It won't take long to write an article, but the drawing is ready for a while. In this article, let's take a few of the different browsers ' understanding of the borders.
The
After reading "how to protect privacy-related software and service selection" and "how to protect privacy-related browsers to cause privacy leaks" and "how to prevent browser cookies, in the face of security risks in browsers, how can we isolate browsers?
★How to isolate browsers?
◇ Why isolate
Get locations across browsersvartypeofwindow‘number‘windowwindow.screenX;vartypeofwindow‘number‘windowwindow.screenY;The Firefox browser does not support Screenleft and screnntop, but supports Screenleft and screnntop for Screenx and Screeny;ie browsers, but Screenx and Screeny are not supportedGet size across browsersvarwidth =window. innerwidth;//window. must have, because IE does not supportvarHeight =window. innerheight;//If inner is supported, th
them, if you want to have a certain distance between them, there are two methods may be implemented, one on the above demo basis to modify the relevant parameters, and second, in the corresponding inside with "div" tag, and set its "padding" value, so more secure, Not to break your layout.Because we have a column that uses the adaptive width, in some browsers, when the browser screen is pulled to a certain size, it gives us the feeling that the self-
For standard browsers, you can directly use css. innerHTML to modify the css rules of HTMLStyleElement.
The Code is as follows:
XxxScriptVar css = document. createElement ('style ');Css. setAttribute ('type', 'text/css ');Var cssText = 'span {color: Red ;}';If (css. styleSheet) {// IECss.styleSheet.css Text = cssText} Else {Css. appendChild (document. createTextNode (cssText ));}Document. getElementsByTagName ("head") [0]. appendChild (css );
Some friends want to copy functions on the clipboard, but a lot of code on the Internet cannot run, and various other symbols lead to the unavailability of the script. the webmaster of the script house specially sorted it out and corrected the error. It must be noted that you must set it in firefox.
Signed. applets. codebase_principal_support
In the address bar of the firefox browser, enter "about: config" in the filter and double-click "signed. applets. codebase_principal_support" to set "true.
Man-in-the-middle attack caused by improper handling of TLS certificates by the Cheetah and 2345 browsers
When the SSL/TLS certificates provided by the https web pages opened by the two browsers are invalid (such as self-Signed and Domain Name Mismatch), the pages are automatically opened. A text prompt is displayed on the cheetah Security browser. 2345 the accelerated browser does not even have obvious tex
Eleven filter effects for static images-Ie7 and non-ie browsers are not supported. Please create a new file testimage.html
Note:
Eleven filter effects for static images-Ie7 and non-ie browsers are not supported.Welcome to the invitation month. net technology and software architecture
The content is as follows (you can modify it yourself ):
The Code is as follows:
Test image effects
Css modifies the differences between Input tags in various browsers. First, it describes the differences in input, select, and other expressions in various browsers:
1. When the input or select statement is mixed with other labels (such as a and label), a non-resident problem may occur.
2. There are differences in the height of the input text lines in the input, and there are gaps.
3... during mixed sorting
The following describes the code for customizing the mouse/cursor pointer style on a webpage, which is compatible with IE and Firefox browsers. Let's take a look at it with the fire.
Body {cursor: url (images/liehuo_net.cur), url (/images/liehuo_net.cur), auto ;}
Fire prompt:
In IE, the Url can be a relative or absolute path.FF, the Url can only be an absolute path.The above style works in both browsers.
OrderBefore writing the article, first to recognize a mistake, in fact, this article and the next article will be written should be completed last month. But, for some reason, not to come and finish. Therefore, the debt owed last month is now made up. Nonsense not much to say, directly on the content.ProblemChildren who have done web development know that after opening the site, it is generally necessary to enter the user name, password. However, this simple operation, when submitted, may expose
[Document of the fire School of website construction] we advocate the use of CSS whenever possible, so that we are more likely to succeed. the support for CSS in the browser is already very good. It must be enough for you to control your webpage layout and layout. however, even so, some page elements may behave differently in different browsers.
If you do not understand the reason, do not worry. go deep into the CSS rules and read the Using CSS to Fix
Common AJAX functions are used to create XMLHTTP objects, which are different from functions in IE and Mozilla browsers. There are many functions on the Internet that create XMLHTTP objects, which are different from functions in IE and Mozilla browsers. This is quite good and you can use it directly.Copy codeThe Code is as follows:Function getRequest (){Http_request = false;If (window. XMLHttpRequest ){// C
Compatible with the iframe adaptive height of mainstream browsers. The specific js script is as follows. If you are interested, do not miss the Iframe adaptive height compatible with mainstream browsers. The js script is as follows:
The Code is as follows:
// Iframe highly adaptiveFunction iframeAutoFit (iframeObj ){SetTimeout (function (){If (! IframeObj) return;IframeObj. height = (iframeObj. Document?
This sorting mechanism is compatible with IE and ff to achieve unified sorting in all browsers. Specific Technology 1. Use GB encoding and UNICODE conversion.
2. array Association sorting
Note: GB encoding library address http://demo.jb51.net/jslib/qswhGB2312.js
Code (the demo is very simple)
The Code is as follows:
Script// Power by plush cat liuyutong@baidu.comVar strGB = "ah, sorry, no cancer, no. I love the saddle, no ammonia, and the case of t
JavaScript is compatible with xml processing functions (xml synchronous asynchronous loading, xsl conversion, selectSingleNode, and selectNodes) in IE, FireFox, Chrome, and other browsers. It is often a headache for browser compatibility when writing web pages that process xml. So I encapsulate common xml operations as functions. After a period of improvement, it is very stable and comfortable to use.
Functions have --
Xml_loadFile: xml synchronous/as
This article mainly introduces javascriptfor-in to traverse json data in an orderly manner and explore the information about the differences between browsers. For more information, see object itself as a collection of objects, therefore, when we use the for-in statement to traverse the attributes of an object, the order of the retrieved attributes is different from that of the object definition.
Understand W3C standards:
As described in the third ed
Now HTML5 more and more attention, but currently support HTML5 browser is not mainstream, especially domestic users nearly 50% still use IE6, because support HTML5 IE9 does not support the installation of XP system, so the future for a long time, HTML5 developers will have to consider backwards compatibility issues. There are many ways to HTML5 tag or CSS selector compatibility, in which a self-generated tag element is one.The basic principle is that the following code works in IE8, and the styl
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.