問題:
Is it possible to do this:是否有可能做到這一點:
myfile.js:
function foo() {
alert(<my-function-name>);
// pops-up "foo"
// or even better: "myfile.js : foo"
}
I've got the Dojo and jQuery frameworks in my stack, so if either of those make it easier, they're available.我的堆棧中有 Dojo 和 jQuery 框架,所以如果它們中的任何一個使它更容易,它們都可用。
解決方案:
參考一: https://en.stackoom.com/question/4FaZ參考二: https://stackoom.com/question/4FaZ