Create a copy of UBB software Information link or button JS code _javascript Tips

Source: Internet
Author: User
<a href= "Java script:void (0)" onclick= "Copyinfo ()" > click Copy Ubb label </a>
<input type= "button" onclick= "Copyinfo ()" value= "click Copy ubb label"/>
<script language= "JavaScript" >
function Copyinfo () {
var obj = document.getElementById ("Ubbinfo");
if (obj!=null) {
var txt = document.body.createTextRange ();
Txt.movetoelementtext (obj);
Txt.execcommand ("Copy");
Alert (' Software information has been copied, can be pasted directly. ');
}
else {
Alert (' Copy error, please contact admin! ');
}
}
</script>

<div id= "Ubbinfo" style= "Display:none;" >

Modify the software information you need to copy here:<br>

[Size=3] [b] {Softtitle} [/b] [/size]<br/>
Software size: {softsize}<br/>
Software language: {softlanguage}<br/>

[b] Download address: [/b]<br/>
[Url={softurl}] {Softurl} [/url]<br/>

Interface preview: <br/>
[img] {Softimageurl} [/img]<br/>

Detailed Introduction: <br/>
{Softintro length= "clearhtml= True"}
</div>





Copy the above code to the appropriate location of the Software Information page template, you can get the copy of the Software Information button and link, you may choose one, div contains content will not appear in the page. You can modify the software information. You need to regenerate the page after you modify the template.

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.