以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 IMS/SCORM/E-learning 』  (http://bbs.xml.org.cn/list.asp?boardid=9)
----  初学请教问题!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=9&rootid=&id=11408)


--  作者:红桃八
--  发布时间:10/29/2004 11:23:00 AM

--  初学请教问题!
function doLMSGetValue(name)
{
   var api = getAPIHandle();
   if (api == null)
   {
      // alert("Unable to locate the LMS's API Implementation.\nLMSGetValue was not successful.");
      return "";
   }
   else
   {
      var value = api.LMSGetValue(name);
      var errCode = api.LMSGetLastError().toString();
      if (errCode != _NoError)
      {
         // an error was encountered so display the error description
         var errDescription = api.LMSGetErrorString(errCode);
         // alert("LMSGetValue("+name+") failed. \n"+ errDescription);
         return "";
      }
      else
      {
         
         return value.toString();
      }
   }
}
function doLMSSetValue(name, value)
{
   var api = getAPIHandle();
   if (api == null)
   {
      // alert("Unable to locate the LMS's API Implementation.\nLMSSetValue was not successful.");
      return;
   }
   else
   {
      var result = api.LMSSetValue(name, value);
      if (result.toString() != "true")
      {
         var err = ErrorHandler();
      }
   }

   return;
}

两个函数什么意思?


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms