Internet Explorer cookie not being set properly using JavaScript

前端 未结 3 1560
天涯浪人
天涯浪人 2021-01-23 09:16

I am trying to save / restore the scrolling location on Postbacks. My code works for Firefox and all major browsers except for Internet Explorer.

    function sa         


        
3条回答
  •  攒了一身酷
    2021-01-23 09:29

    Cookie data is not supposed to be able to contain commas. You'll need to encode or escape your scroll data before writing it, and then decode or unescape it on read.

    Edit: You could also just change your delimiter; maybe try a pipe ( | )?

提交回复
热议问题