Problem of unable to copy text under resolution mode window (ShowModalDialog)

Source: Internet
Author: User
Just put the content you want to select and copy into a <span> or other container, and then set the Contenteditable= "true" property of span. The complete code is as follows:

<span id= "MySpan" name= "MySpan" contenteditable= "true" >

What you want to select and copy
</span>

can also use JS to achieve,


document.all["LAB1"].contenteditable = "True";

or using jquery to implement


$ ("Body"). attr ("contenteditable", "True");

Note that this method makes the content editable ...

--------------------------------------------------------------------------

Other implementation methods:

1, change the way, with window.open to achieve

2, plain words can be used without a border-only read-only textarea text box (that is, the textbox is set to ReadOnly, but not disabled, so you can guarantee the right mouse button menu)

3, with the DIV simulation

4, div simulation content with an IFRAME nested other pages

5, with the JS event, double-click to copy to the Clipboard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.