Html and Internet Explorer: How to avoid hidden elements to be copied/pasted

后端 未结 2 1320
礼貌的吻别
礼貌的吻别 2021-01-22 09:56

I\'ve a TABLE, in a HTML5 document.

I\'ve a view selector who hide/show some rows, using jQuery hide() and show().

When user select the

2条回答
  •  有刺的猬
    2021-01-22 10:40

    It seems like this question has been asked before multiple times. (1) - (2)

    It seems like there has not been a response that works fine for everyone.

    You could use is.(':visible') in jQuery but not sure that translates back to javascript (not very good at it).

    Other people have suggested cloning the table and only copying what's in the other table which is hidden, but then that causes a problem later on with other browsers which work fine.

    You could use the above method which would work but it's a nasty hack.

    There is an answer here which may be of interest to you, however I'm not sure what you're trying to copy and if this is worth the effort.

    If all else fails, here are some other recommendations:

    • change users

    • force users to change browser

    • render only visible cells and change server code

提交回复
热议问题