找不到Javascript函数 [英] Javascript function not found

查看:72
本文介绍了找不到Javascript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在页面顶部,我声明:

At the top of my page I declared:

<script type="text/javascript" >
function BrowseClick() {
    document.getElementById('ctl00_ContentPlaceHolder1_file').click();
}



然后,我有:



Then later I have:

<igtbl:UltraWebGrid ID="ugrdCorres" runat="server" 
onclickcellbutton="BrowseClick()" >



有了这个我得到以下错误:
``ASP.pages_correspondence_aspx''不包含``BrowseClick''的定义,并且找不到扩展方法``BrowseClick''接受类型为``ASP.pages_correspondence_aspx''的第一个参数(您是否缺少using指令还是程序集引用?)



With this I get the following error:
''ASP.pages_correspondence_aspx'' does not contain a definition for ''BrowseClick'' and no extension method ''BrowseClick'' accepting a first argument of type ''ASP.pages_correspondence_aspx'' could be found (are you missing a using directive or an assembly reference?)

推荐答案

您确定"onclickcellbutton"是客户端事件吗?因为似乎在运行时将其视为,并将EventHandler附加到网格上
are you sure that "onclickcellbutton" is a client side event? because it seems that at runtime it is considered as and EventHandler attached to the grid


try
onclickcellbutton="javascript:BrowseClick();" >



祝你好运!



good luck!


这篇关于找不到Javascript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆