Home  >  Q&A  >  body text

javascript - How can I right-click the content of a website after selecting it, but there is no copy in the right-click, and can I use ctrl+c to copy it?

For example, the content of this website
http://bj.kongjianjia.com/xie...

黄舟黄舟2685 days ago819

reply all(4)I'll reply

  • 仅有的幸福

    仅有的幸福2017-06-13 09:26:04

    Reconstruct the right-most event
    http://www.oschina.net/code/s...

    reply
    0
  • PHP中文网

    PHP中文网2017-06-13 09:26:04

    contextmenu event prevents the default behavior of right click

    reply
    0
  • PHP中文网

    PHP中文网2017-06-13 09:26:04

    $(document).bind('contextmenu', function () {
        return false;
    })

    reply
    0
  • 滿天的星座

    滿天的星座2017-06-13 09:26:04

    https://developer.mozilla.org... More detailed
    document.addEventlistener('contextmenu',function(e){e.preventDefault();})

    reply
    0
  • Cancelreply