Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不明白如何在同一个函数中任何需要的地方访问我的函数 thumbs()。
这是一个演示链接:
http://jsfiddle.net/L7yKp/60/
函数 thumbs(),这应该能够在同一个函数中任何需要的地方调用
这是你要找的吗?
$('#tprev').click(function(e){ thumbs(0,1); });
我不确定你想要什么。我有点假设你复制粘贴了一些 JS 并试图执行代码。
这样做非常简单,就是在事件单击 id 为 #tprev 的元素时使用这些参数调用此函数。我把 0 和 1 作为纯粹的猜测。可能是你想要的。