需要对象
function OnImageClick ()
{
var url;
switch (picNumber) {
case 0:
url = "http://www.zagreb.in/horoskop/rak.html";
break;
case 1:
url = "http://www.zagreb.in/horoskop/ovan.html";
break; <-- error
case 2:
url = "http://www.zagreb.in/horoskop/djevica.html";
break;
case 3:
url = "http://www.zagreb.in/horoskop/vaga.html";
break;
你好,我的 IE 有问题,错误是第 55 行需要对象,这是第二个中断; 你能帮助我吗, 问候
艾伦
function OnImageClick ()
{
var url;
switch (picNumber) {
case 0:
url = "http://www.zagreb.in/horoskop/rak.html";
break;
case 1:
url = "http://www.zagreb.in/horoskop/ovan.html";
break; <-- error
case 2:
url = "http://www.zagreb.in/horoskop/djevica.html";
break;
case 3:
url = "http://www.zagreb.in/horoskop/vaga.html";
break;
Hi, I have problem IE, error is Object required on line 55 and it is the second break;
Can you help me,
Regards
Alen
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你从哪里得到那个图片编号?是全球性的吗?如果没有,可能会抛出错误,因为它尚未初始化。
Where did you get that picNumber? Is it global? If not, maybe that throws the error because it is not initialized.
很难说错误是从哪里来的。首先尝试启用您的 ie 调试器,以便您可以捕获错误的确切位置并发回您的发现,以便我们提供帮助。
启用 IE 调试器:
选项->高级
“禁用脚本调试(Internet
资源管理器)”选项。
运行你的程序,遇到问题时就会出现ie调试器。
It's hard to tell where the error comes from. Try enabling your ie debugger first so that you can catch the exact location of the error and post back your findings so that we can help.
Enabling debugger for IE:
Options->Advanced
"Disable script debugging(Internet
Explorer)" option.
Run your program and the ie debugger will appear when it encounters a problem.
我相信对象错误发生只是因为您没有将值传递给该函数。应该像下面这样
I believe that object error happens only because you are not passed the value to this function. it should be like bellow,