马上加入IBC程序猿 各种源码随意下,各种教程随便看! 注册 每日签到 加入编程讨论群

C#教程 ASP.NET教程 C#视频教程程序源码享受不尽 C#技术求助 ASP.NET技术求助

【源码下载】 社群合作 申请版主 程序开发 【远程协助】 每天乐一乐 每日签到 【承接外包项目】 面试-葵花宝典下载

官方一群:

官方二群:

C#的webbrowser和Geckowebbrowser为何不能手工打开网页

  [复制链接]
查看26803 | 回复9 | 2014-12-3 16:42:16 | 显示全部楼层 |阅读模式
为何在webbrowser和Geckowebbrowser中都不能手动重定义url地址啊...麻烦高人能指点一下啊
网址:www.zkrspx.com
ibcadmin | 2014-12-3 20:18:28 | 显示全部楼层
请详细说明
C#论坛 www.ibcibc.com IBC编程社区
C#
C#论坛
IBC编程社区
youth2004 | 2014-12-4 14:06:42 | 显示全部楼层
C#打开webbrowser显示'json'未定义
网址:http://zly.zkrspx.com/common/zx.jsp?page=3&t=1417666952359
源码内部的ajax执行出错啊
ibcadmin | 2014-12-4 14:40:08 | 显示全部楼层
webbrowser1.slient = True
webBrowser1.ScriptErrorsSuppressed = true;
C#论坛 www.ibcibc.com IBC编程社区
C#
C#论坛
IBC编程社区
youth2004 | 2014-12-4 14:46:29 | 显示全部楼层
ibcadmin 发表于 2014-12-4 14:40
webbrowser1.slient = True
webBrowser1.ScriptErrorsSuppressed = true;
错误是不弹出了,但是关键下面出现的错误后,网页就不执行下去了......

C#打开webbrowser显示'json'未定义
网址:http://zly.zkrspx.com/common/zx.jsp?page=3&t=1417666952359
源码内部的ajax执行出错啊
ibcadmin | 2014-12-4 14:49:27 | 显示全部楼层
youth2004 发表于 2014-12-4 06:46
错误是不弹出了,但是关键下面出现的错误后,网页就不执行下去了......

C#打开webbrowser显示'json'未 ...

你这个网站就是错的吧? 我这都进不去
C#论坛 www.ibcibc.com IBC编程社区
C#
C#论坛
IBC编程社区
youth2004 | 2014-12-4 14:51:08 | 显示全部楼层
网址是对的,源代码中的就是内部的JSON未定义啊。你能看下源代码吗??
youth2004 | 2014-12-4 14:52:07 | 显示全部楼层
本帖最后由 youth2004 于 2014-12-4 14:53 编辑
ibcadmin 发表于 2014-12-4 14:49
你这个网站就是错的吧? 我这都进不去
你能帮助我qq远程协助一下吗???不好意思了。。。
QQ 491926857
ibcadmin | 2014-12-4 16:14:47 | 显示全部楼层
youth2004 发表于 2014-12-4 06:51
网址是对的,源代码中的就是内部的JSON未定义啊。你能看下源代码吗??

  你发的网址我就打不开
C#论坛 www.ibcibc.com IBC编程社区
C#
C#论坛
IBC编程社区
youth2004 | 2014-12-4 16:56:00 | 显示全部楼层
本帖最后由 youth2004 于 2014-12-4 16:59 编辑

能打开,就是不显示啊..你可以看看网页的源代码的.绿色的代码提示://----------------此处JSON出错
这个网页源代码是
[AppleScript] 纯文本查看 复制代码
<HTML><HEAD><META content="IE=7.0000" http-equiv="X-UA-Compatible">
<TITLE>助力云</TITLE>
<META charset=utf-8><!-- css -->
<META name=viewport content="width=device-width, initial-scale=1, user-scalable=no"><LINK rel=stylesheet type=text/css href="../css/bootstrap/bootstrap.min.css"><LINK rel=stylesheet type=text/css href="../css/bootstrap/font-awesome.min.css"><LINK rel=stylesheet type=text/css href="../css/site.min.css"><!-- script --><!-- jquery -->
<SCRIPT type=text/javascript src="../js/jquery/jquery-1.10.1.min.js"></SCRIPT>
<SCRIPT type=text/javascript src="../js/jquery/yangfo.js"></SCRIPT>
<!-- bootstrap -->
<SCRIPT type=text/javascript src="../js/bootstrap/bootstrap.min.js"></SCRIPT>
</HEAD>
<BODY style="ZOOM: 1" windowc_onresizez="true">
<SCRIPT>
        function getPage(hasLogin) {
                if(!hasLogin) {
                        return '../website/index.jsp';
                }                
                var page = '3';
                if(page == '1') {
                        return '../fee/buy.jsp';
                }
                if(page == '2') {
                        return '../learn/myCourse.jsp?type=1';
                }
                if(page == '3') {
                        return '../exam/examList.jsp';
                }
                if(page == '4') {
                        return '../exam/scoreList.jsp';
                }
                if(page == '5') {
                        return '../exam/scoreList.jsp';
                }
                return '../website/index.jsp';
        }
        
        function checkLogin() {
                // 获取原Session
                $.get("../service/restful/session", function(result){
                        if(result == null) return;                        
                        var json = JSON.parse(result);                        
                        if(json.status == 0) {
                                top.location.href = getPage(true);
                                return;
                        }                 
                        // 检查登录信息
                        $.ajax({
                                type : "get",
                                async: false,
                                url : "http://member.zkrspx.com/service/restful/session?spam=1417682857286",
                                dataType : "jsonp",
                                jsonp: "jsoncallback",
                                success:function(result){
                                        if(result == null) return;                                        
                                        var json2 = JSON.parse(result);//----------------此处JSON出错
                                        if(json2.status != 0) {
                                                top.location.href = getPage(false);
                                                return;
                                        }                                        
                                        // 将获得的用户信息存入Session,然后刷新当前页面
                                        $.ajax({
                                                type : "post",
                                                async: false,
                                                url : "../service/restful/session?_method=put",
                                                data: JSON.stringify(json2),
                                                dataType : "jsonp",
                                                jsonp: "jsoncallback",
                                                success:function(result3){
                                                        // alert('result3 ' + result3);
                                                        if(result3 == null) return;
                                                        var json3 = JSON.parse(result3);                                                        
                                                        if(json3.status == 0) {
                                                                top.location.href = getPage(true);
                                                                return;
                                                        }
                                                },
                                                error:function() {
                                                        top.location.href = getPage(false);
                                                        return;
                                                }
                                        });
                                },
                                error:function() {
                                        top.location.href = getPage(false);
                                        return;
                                }
                        });
                });
        }
        
        checkLogin();
</SCRIPT>
</BODY></HTML>



*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则