- 论坛徽章:
- 0
|
本帖最后由 Perl_Er 于 2013-10-26 10:35 编辑
1. 有一个网站,index里面调用了一个js来显示登录界面,如下面:
<script src="js/portal.js"></script>
这是这个js里面的内容:
$(document).ready(function() {
Portal.start();
});
.....
下面的省略了,上面几行就是调用下面的函数。其中一个是加载login页面
$("#content" .html("Loading..." ;
$.get("modules/"+module+"/login.html", args, function(data) {
然后我用WWW::Scripter代码如下:- #!/usr/bin/perl
- use strict;
- use warnings;
- use Data::Dumper;
- use WWW::Mechanize;
- use LWP::Debug qw(+);
- use IO::Socket::SSL qw();
- use WWW::Scripter;
- my $w = new WWW::Scripter(ssl_opts => { SSL_verify_mode =>
- IO::Socket::SSL::SSL_VERIFY_NONE, verify_hostname => 0 });
- $w->use_plugin('JavaScript'); # packaged separately
- $w->use_plugin('Ajax'); # packaged separately
- $w->agent_alias( 'Linux Mozilla' );
- $w->get('http://portal-dev.aaa.net');
- print $w->content;
复制代码 运行后报错:
ReferenceError: The variable JSON has not been declared at https://portal-dev.aaa.net/js/jquery-2.0.3.min.js, line 4.
ReferenceError: The variable jQuery has not been declared at https://portal-dev.aaa.net/js/jquery.upload-1.0.2.js, line 9.
ReferenceError: The variable jQuery has not been declared at https://portal-dev.aaa.net/js/jLog.min.js, line 16.
....
下面是index页面
哪位帮忙看一看,谢谢! |
|