<div class="share-cell">
	<div class="hd">邀请好友的注册链接</div>
	<div class="share-row">
		<div class="flex_bd">
			<input type="text" class="weui-input" name="" id="" value="https://www.orson66.com/#/regist" />
		</div>
		<a href="javascipt:;" data-clipboard-text="https://www.orson66.com/#/regist" class="btn-copy"></a>
	</div>
</div>
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script>
var clipboard = new ClipboardJS('.btn-copy');
/*复制成功或失败后提示,不需要可删除*/
clipboard.on('success', function(e) {
	weui.toast('复制成功', 3000);
});
clipboard.on('error', function(e) {
	console.log('复制失败');
});
/*复制成功或失败后提示,不需要可删除*/
</script>

By lxcss

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注