How to solve the incompatibility of easyui in IE
This time I will bring you the method to solve the incompatibility of easyui in ie. What are the precautions to solve the incompatibility of easyui in ie. The following is a practical case, let's take a look.
A few days ago, the project entered the final stage of preparation for launch. During the test, it was suddenly discovered that the time obtained using easyui's datetimebox plug-in could not be obtained later than the current time in IE. This was written at the time:$(selector).datetimebox( { formatter : function(date) { var y = date.getFullYear(); var m = date.getMonth() + 1; var d = date.getDate(); var h = date.getHours(); //获取当前小时数(0-23) var mi = date.getMinutes(); //获取当前分钟数(0-59) var s = date.getSeconds(); var result = y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d) + " " + (h < 10 ? '0' + h : h) + ":" + (mi < 10 ? '0' + mi : mi); //console.log(result+"--第127行"); if(second==false){ } else { result += ":" + (s < 10 ? '0' + s : s); } return result; }, parser : function(s) { var t = Date.parse(s); if (!isNaN(t)) { return new Date(t); } else { return new Date(); } } });
formatter is the format for formatting dates. Parser parses your formatted date. For the specific writing method, please see the API diagram I captured:
$(selector).datetimebox( { formatter : function(date) { var y = date.getFullYear(); var m = date.getMonth()+1; var d = date.getDate(); var h = date.getHours(); var min = date.getMinutes(); return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d)+' '+(h<10?('0'+h):h)+':'+min; }, parser : function(s) { var ss = (s.split(" ")); var ymd = ss[0].split("-"); var hms = ss[1].split(":"); //console.log(ymd+" "+hms); var y = parseInt(ymd[0],10); var m = parseInt(ymd[1],10); var d = parseInt(ymd[2],10); var h = parseInt(hms[0],10); var min = parseInt(hms[1],10); if (!isNaN(y) && !isNaN(m) && !isNaN(d) && !isNaN(h) && !isNaN(min)){ return new Date(y,m-1,d,h,min); } else { return new Date(); } } });
if(s==""){ return new Date(); }else{ //alert(s); var ss = (s.split(" ")); var ymd = ss[0].split("-"); var hms = ss[1].split(":"); //console.log(ymd+" "+hms); var y = parseInt(ymd[0],10); var m = parseInt(ymd[1],10); var d = parseInt(ymd[2],10); var h = parseInt(hms[0],10); var min = parseInt(hms[1],10); if (!isNaN(y) && !isNaN(m) && !isNaN(d) && !isNaN(h) && !isNaN(min)){ return new Date(y,m-1,d,h,min); } else { return new Date(); } }
stringtype~so you cannot use s==null to make a judgment condition~
I believe you have mastered the method after reading the case in this article. For more exciting content, please pay attention to other related articles on the php Chinese website! Recommended reading:How to implement the toggle method in jQuery
How to implement jQuery+JSONP across domains
How to use the select component in jquery
How to achieve the jquery carriage return login effect
The above is the detailed content of How to solve the incompatibility of easyui in IE. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



It's no secret that Internet Explorer has fallen out of favor for a long time, but with the arrival of Windows 11, reality sets in. Rather than sometimes replacing IE in the future, Edge is now the default browser in Microsoft's latest operating system. For now, you can still enable Internet Explorer in Windows 11. However, IE11 (the latest version) already has an official retirement date, which is June 15, 2022, and the clock is ticking. With this in mind, you may have noticed that Internet Explorer sometimes opens Edge, and you may not like it. So why is this happening? exist

More and more users are starting to upgrade the win11 system. Since each user has different usage habits, many users are still using the ie11 browser. So what should I do if the win11 system cannot use the ie browser? Does windows11 still support ie11? Let’s take a look at the solution. Solution to the problem that win11 cannot use the ie11 browser 1. First, right-click the start menu and select "Command Prompt (Administrator)" to open it. 2. After opening, directly enter "Netshwinsockreset" and press Enter to confirm. 3. After confirmation, enter "netshadvfirewallreset&rdqu

easyui is a jquery plug-in. easyui is a front-end UI interface plug-in based on JQuery, which is used to help web developers more easily create feature-rich and beautiful UI interfaces. easyui is a framework that perfectly supports HTML5 web pages, which can help developers save the time and scale of web development.

1. Incompatibility means that the hardware environment or software platform version required for software operation does not meet the requirements. 2. For example, the CPU speed in the hardware is not enough, the memory is too small, the graphics card performance is insufficient, etc., and the graphics acceleration driver version in the software is too high or too low, etc. 3. Therefore, programs caused by these environments cannot run normally and are collectively referred to as incompatible. 4. As long as the motherboard, CPU, graphics card and other hardware have consistent interfaces, can be plugged together, assembled together, and can start and run normally, they are called compatible. Otherwise, they are called incompatible. 5. As for the software, there is a problem with the system and third-party software, resulting in the inability to operate properly.

Recently, many win10 users have found that their IE browser always automatically jumps to the edge browser when using computer browsers. So how to turn off the automatic jump to edge when opening IE in win10? Let this site carefully introduce to users how to automatically jump to edge and close when opening IE in win10. 1. We log in to the edge browser, click... in the upper right corner, and look for the drop-down settings option. 2. After we enter the settings, click Default Browser in the left column. 3. Finally, in the compatibility, we check the box to not allow the website to be reloaded in IE mode and restart the IE browser.

Solutions to IE shortcuts that cannot be deleted: 1. Permission issues; 2. Shortcut damage; 3. Software conflicts; 4. Registry issues; 5. Malicious software; 6. System issues; 7. Reinstall IE; 8. Use third-party tools; 9. Check the target path of the shortcut; 10. Consider other factors; 11. Consult professionals. Detailed introduction: 1. Permission issue, right-click the shortcut, select "Properties", in the "Security" tab, make sure you have sufficient permissions to delete the shortcut. If not, you can try running as an administrator, etc.

June 15, 2022 is the day when Microsoft ends support for Internet Explorer 11 (IE11) and closes its legacy browser chapter. The company has been reminding users of this end-of-life date for some time and calling on them to plan a move to Microsoft Edge. Microsoft bundles IE11 with Windows 8.1 as the modern default web browser for Windows. Although it never reached the (current) heights of Chrome, it was the second most used desktop browser in 2014, behind IE8. Of course, with 20

How to enable IE acceleration function? IE is too slow to open web pages, we can enable hardware acceleration mode in it. Many friends reported that when using IE browser, the speed of opening web pages is extremely slow, which also has a certain impact on our browsing of the web. I just want to ask the editor if there is any solution. In this case, you can turn on the hardware acceleration mode of the IE browser. The editor has compiled the method of turning on the acceleration function of IE. If you are interested, take a look below! To enable the acceleration function in IE, open the IE secure browser, click the gear-shaped "Settings" icon in the upper right corner, and select "Internet Options" to enter, as shown in the figure. 2. Click "Advanced" in the tab navigation at the head of the Internet Options window, as shown in the figure. 3.
