这是什么意思:SCRIPT1006:预期“)”(what does this mean: SCRIP

2019-09-22 13:02发布

我有一个控制器:

 public ActionResult Detail(string title, string directory)
{

  ScormModule module = ZincService.ScormService.GetScormModule(title, directory);


  if (module != null)
  {
      ViewBag.TrainingModuleId = module.ScormModuleId;
      ViewBag.ScormModuleUrl = module.RelativeHtmlPath + '/' + module.EntryPointRef;
      ViewBag.WindowWidth = module.LaunchWidth;
      ViewBag.WindowHeight = module.LaunchHeight;
      ViewBag.title = module.Title;
      return View(module);
  }
  else
    return RedirectToAction("Index", "Scorm", new { area = "Admin" });
}

然后Detail.aspx文件在哪里调用javascript函数:

<div class="col3">
    <a id="training-launch-button" href='javascript:OpenScormModuleWindow("<%: ViewBag.ScormModuleUrl %>", <%:  ViewBag.title %>, <%:  ViewBag.WindowWidth %>, <%:  ViewBag.WindowHeight %>);' class="button">Launch</a>
</div>

然后OpenScormModuleWindow:

function OpenScormModuleWindow(trainingModuleUrl, title, width, height)
{
   console.log(trainingModuleUrl);
   trainingModuleWindow = window.open(trainingModuleUrl, title, "width=" + width + ", height=" + height);
   trainingModuleWindow.focus();
}

ViewBag.ScormModuleUrl = "/SCORM/SellingWindows/a001index.html"

我从来没有得到的输出console.log(trainingModuleUrl); 当我击中了发射按钮我得到有关的错误,并指出一些奇怪的行是无处在我的代码?

var _waxArr; var o = document.getElementById('cosymantecbfw');
o.addEventListener('waxSetArr', function(evt) { _waxArr = evt.detail; }); 
function waxGetElement(i) { return _waxArr[i]; }

我搜索了这个代码,但没有找到它

有人可以帮忙吗? 谢谢

Answer 1:

请问您的标题有什么空间?

如果是的话,试试这个

<div class="col3">
    <a id="training-launch-button" href='javascript:OpenScormModuleWindow("<%:ViewBag.ScormModuleUrl %>", "<%:  ViewBag.title %>", <%:  ViewBag.WindowWidth %>, <%:  ViewBag.WindowHeight %>);' class="button">Launch</a>
</div>


Answer 2:

请注意,“共同[ 赛门铁克 ] BFW”。

我认为这是可以追查到你的浏览器诺顿插件。



文章来源: what does this mean: SCRIPT1006: Expected ')'