javascript 添加'分享whatsapp'

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 添加'分享whatsapp'相关的知识,希望对你有一定的参考价值。

// Add in a 'share on whatsapp' link
var currentUrl = encodeURIComponent(document.URL);
$('.shareList').append('<li class="whatsapp"><a href="whatsapp://send?text=' + currentUrl + '" class="whatsapp" target="_blank">WhatsApp</a></li>');

以上是关于javascript 添加'分享whatsapp'的主要内容,如果未能解决你的问题,请参考以下文章

What's the difference between using “let” and “var” to declare a variable in JavaScript?

What's new in C# 7.0

前端资讯What's New In DevTools (Chrome 70)

What's new in C# 7.0

如何用javascript为元素添加class

What's friendship?