我正在尝试编写一个"Tweet this"按钮,在Twitter上打开一个带有预生成文本的新窗口.我现在得到的是Twitter上的一个窗口,其中包含我来自哪里的URL.我正在使用JQuery API来执行此操作.我项目的链接是http://codepen.io/haldav/pen/KVpojP.我的代码是:
$(document).ready(function() {
random();
function random() {
var quotes = ["You must be shapeless, formless, like water. When you pour water in a cup, it becomes the cup. When you pour water in a bottle, it becomes the bottle. When you pour water in a teapot, it becomes the teapot. Water can drip and it can crash. Become like water my friend.", "Defeat is a state of mind; no one is ever defeated until defeat has …Run Code Online (Sandbox Code Playgroud)