English 中文(简体)
在调用函数时,“未发现 TypeError: 对象不是函数”
原标题:"Uncaught TypeError: object is not a function" when calling a function

我有一个奇怪的代码错误。 我试图通过添加特定触发器来解决一个 [用过 用于在铬工作而不是在 IE( 超能力) 工作的页面, 但现在我正在获取 < code> Uncaught TypeError: 对象不是 Chrome s 控制台中的函数 错误 。

据我所知,这是一项职能(正在进行的工作):

<script type="text/javascript">
    function validate() {                
            var id = jQuery("form").attr( id );
            var formid = "#"+id;
            jQuery(formid).add("<input type="hidden" name="APC_UPLOAD_PROGRESS" value=""+id+"" />");
            jQuery("#validate").hide();
            jQuery("#submitme").show();
    }
</script>

其编号如下:

<button id="validate" onClick="validate()" type="button">Validate</button>

我没有使用

<强 > UPDATE 2

pastbin 链接到窗体代码"http://pastebin.com/3Kw5vdhn" rel="nofollow" >http://pastebin.com/3Kw5vdhn

最佳回答

在铬浏览器中, 您可以要求 JS 执行在例外情况下停止 。 要启用此选项, 请打开 JS 控制台, 并单击主面板和控制台之间胡子左侧的小图标。 如果图标是蓝色的, 您将停止执行所有例外, 如果只在未发现例外时停止执行, 如果它是灰色的, 则停止执行 。

因此单击, 直至红色时停止未捕捉的例外。 运行您的网页和执行程序时, 在例外被提出时应该停止 exactly 。 然后您可以检查验证变量的值 。

我怀疑这是你正在装入的代码和其他代码之间的某种全球可变冲突。要快速检查,重命名验证“validate”和尝试您的代码。

问题回答

Hi Joshua 我尝试在我的个人电脑上使用相同的代码,





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签