深圳全飞鸿

标题: disz的复制功能 [打印本页]

作者: zhgc    时间: 2023-6-25 19:13
标题: disz的复制功能
d:\west.syant\wwwroot\disc\static\js\forum_viewthread.js
function copyThreadUrl(obj, bbname) {



>>>>d:\west.syant\wwwroot\disc\static\js\common.js<<<<<
function setCopy(text, msg) {
>>>>d:\west.syant\wwwroot\disc\static\js\common_extra.js<<<<<
function _setCopy(text, msg){



                        function syantCopyText(text){
                                var textareaC = document.createElement('textarea');
                                textareaC.setAttribute('readonly', 'readonly'); //设置只读属性防止手机上弹出软键盘
                                textareaC.value = text;
                                document.body.appendChild(textareaC); //将textarea添加为body子元素
                                textareaC.select();
                                var res = document.execCommand('copy');
                                document.body.removeChild(textareaC);//移除DOM元素
                                return true;
                        }






欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2