The showmodaldialog interface cannot be copied.

Source: Internet
Author: User

Today, a dialog box is displayed with showmodaldialog, but the preceding labels cannot be copied,
1. htm
<HTML>
<Body>
<Input type = "button" onclick = "commandid showmodaldialog('2.htm','', '');"/>
</Body>
</Html>

2. htm
<HTML>
<Body>
Select the text and copy it.
</Body>
</Html>

Check and find out several solutions: first, replace the label with a text box.
The other is to add a segment to the tag.Code:
2. htm
<HTML>
<Body>
<Span id = "lab1"> select and copy the text </span>
<SCRIPT>
Document. All ["lab1"]. contenteditable = "true ";
</SCRIPT>
</Body>
</Html>
Contenteditable = true is to change the content to the design mode, which can be copied or modified. The default value is "inherit ". Applications are available in some areas with strong custom functions. If the contenteditable of the entire body is changed to true, the content in the body can be pulled in disorder, which is not good for my application this time.

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.