变量名作为Javascript中的字符串
NSStringFromSelector
var myFirstName = 'John';alert(variablesName(myFirstName) + ":" + myFirstName);--> myFirstName:John
更新
FooClass = function(){};FooClass.someMethod = function(json) { // Do something}instanceA = new FooClass();instanceB = new FooClass();doSomethingInAnotherProcess(instanceB); // result will be substituted by using instanceB.someMethod();...
evaluateJavascriptInBrowser("(instanceName).someMethod("resultA");");
慕雪6442864
相关分类