Home > Web Front-end > JS Tutorial > body text

js code to create a link or button that copies UBB software information_javascript skills

WBOY
Release: 2016-05-16 19:06:59
Original
990 people have browsed it
Click to copy the UBB tag






Modify the software information you need to copy here:


[size=3][b]{SoftTitle}[/b][/size]

Software size: {SoftSize}

Software language: {SoftLanguage}


[b]Download address:[/b]

[url={SoftURL}]{SoftURL}[/url]


Interface preview:

[img]{SoftImageURL}[/img]


Detailed introduction:

{SoftIntro Length="200" ClearHtml="True"}







Copy the above code to the appropriate position of the software information page template, and you will get the button and link to copy the software information. You can choose either one. , the content contained in the div will not be displayed on the page. You can modify the software information in it. After modifying the template, you need to regenerate the page. <script> <BR>function copyinfo() { <BR> var obj = document.getElementById("ubbinfo"); <BR> if (obj!=null) { <BR> var txt = document.body.createTextRange(); <BR> txt.moveToElementText(obj); <BR> txt.execCommand("Copy"); <BR> alert('软件信息已复制,直接粘贴即可。'); <BR> } <BR> else { <BR> alert('复制错误,请联系管理员!'); <BR> } <BR>} <BR></script>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!