Home >CMS Tutorial >DEDECMS >How to display the copy address in DEDECMS

How to display the copy address in DEDECMS

藏色散人
藏色散人Original
2019-12-26 09:31:571944browse

How to display the copy address in DEDECMS

How to display the copy address in DEDECMS?

I saw that many websites have several icons under the articles, such as the function of copying the article address and recommending it to QQ friends, which is very good. Let me share the code with everyone

Recommended learning: Dream Weaver cms

Add the following code to the verification position in the corresponding template

The code is as follows:

<script language="JavaScript"> 
<!-- 
function copyUrl(url){ 
var content=&#39;&#39;; 
window.clipboardData.setData("Text",url); 
alert("复制成功,请粘贴到你的QQ/MSN上推荐给你的好友"); 
}//--> 
</script> 
<a href="javascript:copyUrl(&#39;{dede:field name=&#39;title&#39;/}\n{dede:field name=&#39;arcurl&#39;/}&#39;)">复制地址给好友</a>

The above is the detailed content of How to display the copy address in DEDECMS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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