我编写了以下代码 [ Windows Store JavaScript App] :
function get_ver(){
     get_text("verfile");
     // how to get value read by get_text [i.e. variable filedata] in this function??? 
}
function get_text(filepath) {
var p = "ms-appx:///" + filepath;
var uri = new Windows.Foundation.Uri(p);
Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri)
   .then(function (sampleFile) {
       return Windows.Storage.FileIO.readTextAsync(sampleFile);
   }).done(function (filedata) {
         document.getElementById("t").innerHTML = filedata;
        // want to return filedata to get_ver()
   }
   );
 }
我想访问从 get_ver() 中的 'verfile' [即变量 filedata 的值] 读取的数据可能作为返回值。怎么做?
我不想将值设置为元素的 innerHTML,而是希望它应该返回给调用者,以便可以进一步处理它。