首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c# webbrowser 怎么调用一个js文件里的js方法

2013-08-23 
c# webbrowser 如何调用一个js文件里的js方法现在有一个网页用webbrowser加载进来,网页html中有一个js文件

c# webbrowser 如何调用一个js文件里的js方法
现在有一个网页用webbrowser加载进来,网页html中有一个js文件: 
<script type="text/javascript" src="http://...js/modules/myorder.js?_=2.89">
(貌似这个js文件用view source是看不到的,但是用firebug可以看到)
上面一个js文件里有一个方法定义mysubmitAll定义如下:

myGH.myrun(function () {
    var myOrder = {
        mysubmitAll: function () {
            var that = this;
            var otherFormDv = $("#otherFormDv");
            otherFormDv.append($("#extParamForm").contents());
            otherFormDv.append($("#patientInfo").contents().not(":disabled"));
            otherFormDv.append($("#reservationReason").contents().not(":disabled"));
            that.form.submit()
        }
    };
},
[GH.modules.autocomplete, GH.modules.datepicker, GH.modules.swfupload, GH.modules.tooltip]);

请问我如何在c# webbrowser中如何用代码动态触发这个mysubmitAll方法?能提供一个完整的语句最好
注:别灌水,有效的解决方案将独自得到80分!! C# JavaScript HTML 函数
[解决办法]
代码没有贴全吧。myOrder是一个局部变量,只有闭包函数可以访问到它,没有返回的话,外面是得不到的。

热点排行