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.
谁能告诉我为什么我得到错误“翻译未定义”?
工作示例 http://jsfiddle.net/PkqKg/7/
我很困惑。提前谢谢! 彼得
jsfiddle 在闭包内运行 Javascript 框的内容,因此无法全局访问您的变量。如果你愿意,你可以这样做
window.translater = function() {.. }
或者干脆将其更改为无包装(头部或身体) http://jsfiddle.net/PkqKg/9/
或者你也可以像这样使用:
http://jsfiddle.net/corotchi/PkqKg/10/