innerHTML working in FF but not in IE!

后端 未结 3 2035
暖寄归人
暖寄归人 2020-12-20 07:31

In my JSP i am using a custom tag
like:

Date From:

and in my common.js fi

3条回答
  •  情歌与酒
    2020-12-20 08:05

    You need to tell IE about the tag first. Add this line somewhere before calling addDateFormatInfo():

    document.createElement("showDateFormat");
    

    IE will now initialize the element correctly - you can treat it just like any other element. Firefox does this automatically.

    Here's the source blog post:

    http://ajaxian.com/archives/getting-html-5-styles-in-ie-7

    Support for createElement() starts in IE7 - though I works fine in FF3.0.15

    Full Example

    
    
        
            
            Home | My Website
        
        
        
    
    
    
    
    Date From:
    Date From:
    Date From:
    Date From:

提交回复
热议问题