# ieBetter.js
**Repository Path**: kkkkill/ieBetter.js
## Basic Information
- **Project Name**: ieBetter.js
- **Description**: make ie browser like a morden browser main for ie6~ie8,
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-11-29
- **Last Updated**: 2021-11-29
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
ieBetter.js
================
It's created for IE6-IE8.
Why need this?
-----------------
Modern browsers are so powerfull. For some small project, there is no any reason to include a large JavaScript library. For example, jQuery, Kissy and so on.
So, what we need is just a JavaScript file which is created only for IE6-IE8, and make IE6-IE8 like a modern browser(Chrome, IE9+, ...).
How to use?
----------------
Simplely, include 'ieBetter.js', then just use APIs as in modern browser. For example, you can use document.querySelector to select the DOM element, and so on. The APIs that you can use see below.
document.querySelector("#id");
Because of that only IE6-IE8 need ieBetter.js. So we have to do some special deal. For Example, IE conditional comments. Like this:
<!--[if lte IE 8]> <script src="ieBetter.js"></script> <![endif]-->However, IE10+ begin to ignore conditional comments. So, for this browser, if the page is in a IE6-IE8 documentMode,
ieBetter.js will be ignored. So, maybe you can try this method:
if (!document.addEventListener) {
// IE6~IE8
document.write('<script src="ieBetter.js"><\/script>');
}
Good luck for you!
APIs and Demos
------------------
So far, the APIs that has supported are: | 支付宝 | 微 信 |
|---|---|
![]() |
![]() |