SoFunction
Updated on 2025-04-03

Differences in IE and FF

Differences in IE and FF

Updated: July 29, 2010 12:59:45 Author:
This method is very commonly used. For example, you can use it when verifying whether the input date exists. If it is a date that does not exist, its return value will be NaN. In addition, if you want to compare the sequence of two dates, or calculate the number of days that differ between the two dates, you can use it.
(dateVal)

This method is very commonly used. For example, you can use it when verifying whether the input date exists. If it is a date that does not exist, its return value will be NaN. In addition, if you want to compare the sequence of two dates, or calculate the number of days that differ between the two dates, you can use it.

Today, I encountered a strange problem when comparing the date sequence using it. It is about the date format. The parse method requires that short dates can be used with "/" or "-" as the separator, but must be represented in the format of month/day/year. For example, today is "7/6/2008" or "7-6-2008". The problem occurs here. When using the format of "7-6-2008", it can be parsed normally in IE, but in FireFox, the return value is always NaN. At first I thought it was a problem with the code, but after checking, I found out that it was the reason for the browser. Later, after changing the format to "7/6/2008", I can parse it normally in IE and FF.
  • date
  • parse

Related Articles

  • WeChat mini program learning summary (IV) Analysis of events and bubbling examples

    This article mainly introduces the WeChat applet learning summary (IV) Events and bubbles, and analyzes the WeChat applet events, bubbles, and data acquisition related mechanisms, principles and operation precautions. Friends who need it can refer to it
    2020-06-06
  • ajaxControlToolkit AutoCompleteExtender usage

    I used this control in search yesterday, but I don't know why it reacts slowly in IE
    2008-10-10
  • Copy to the clipboard in GWT js+flash to achieve copying, better compatibility

    Today I saw a Google Code project called ZeroClipboard, which is the general idea of ​​using flash as a medium to copy the content to the clipboard. This is better than using pure javascript, because different browsers will react differently for security reasons. For example, IE will give a prompt, and some browsers do not support copying to the clipboard.
    2010-03-03
  • Detailed explanation of the process of converting Baidu map coordinates into Tencent map coordinates

    This article mainly introduces the detailed explanation of the process of converting Baidu map coordinates to Tencent map coordinates through WeChat applets. The example code in the article is introduced in detail, which has certain reference value for everyone's learning or work. Friends who need it can refer to it.
    2019-07-07
  • BootStrap Tooltip plugin source code analysis

    This article mainly analyzes the source code of BootStrap Tooltip plug-in in detail for everyone, which has certain reference value. Interested friends can refer to it.
    2016-12-12
  • JS determines the implementation idea and test code of different CSS style files to call different resolutions

    Recently, I saw a website and found that the monitor has different resolutions and the style files are called differently. So I was curious about researching and wrote one. After testing, I felt it was pretty good. If you are interested, you can take a look.
    2013-01-01
  • Use js' selection range operation to select area content and pictures

    This article mainly introduces the relevant knowledge of using js selection range operation to select area content and pictures. It has good reference value. Let's take a look with the editor below
    2017-04-04
  • Implementation method of displaying multiple decimal places after js decimal calculation

    Below, the editor will bring you an article on how to calculate the decimal point of js and display multiple decimals. The editor thinks it is quite good, so I will share it with you now and give you a reference. Let's take a look with the editor
    2016-05-05
  • Implementation code of the sliding page of WeChat applet hide and display component functions

    This article mainly introduces the functions of sliding page hiding and displaying components of WeChat applets. This article introduces you very detailed through the example code, which has certain reference value for your study or work. Friends who need it can refer to it.
    2020-06-06
  • Simple implementation case of JS message function (recommended)

    Below, the editor will bring you a simple implementation case of JS message function (recommended). The editor thinks it is quite good, so I will share it with you now and give you a reference. Let's take a look with the editor
    2016-06-06

Latest Comments