由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - 求助: 关于Perl and Javascript
相关主题
Help on View DB talbe using Perl CGIwhat is cgi?
Perl CGI to MySQL problem[转载] Perl CGI and Excel files
[转载] Perl for programmers(10): A template for CGI file那位大虾知道那里有免费空间支持ASP,PHP,CGI或PERL?
perl cgis: how to send back frame webpage?谁推荐一个CGI/PERL写的论坛程序?最好是汉化过的
Help me with a stupid question.\\\\\\\\\\\\\\\\A question about CGI//////////////
一个perl初级问题[转载] How many version of Perl/CGI are there?
**********Help Needed! 怎样在最短的时间内学会CGI??急!!!************菜鸟求救-----情推荐一个好的Host
怎么样在个人主页上运行CGI?在CGI程序中有何好方法返回HTML
相关话题的讨论汇总
话题: perl话题: javascript话题: end话题: cgi话题: testarray
进入BuildingWeb版参与讨论
1 (共1页)
b*h
发帖数: 353
1
问题1:JAVASCRIPT 能否连接数据库(mySQL)?
问题2:能否把 Javascript 嵌入在 Perl code 中(Perl for CGI),我曾作了简单测试
但不成功, 下面是code:
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $teststring = 'This is content from Perl';
my @testarray = ('item1', 'item2', 'item3');
print <
print "Content-type: text/javascript";

alert('Soon, I will rebuild my browser!')
END

for (0..$#testarray) {
print <
document.write ('

$testarray[$_]

\\\\n')
END
}
Please help, th
p******f
发帖数: 162
2

yes, you can use perl to generate whatever document you want, including
javascript, just remember, the output of perl program is what will be
sent to the browser, so make sure it is valid document.

【在 b*h 的大作中提到】
: 问题1:JAVASCRIPT 能否连接数据库(mySQL)?
: 问题2:能否把 Javascript 嵌入在 Perl code 中(Perl for CGI),我曾作了简单测试
: 但不成功, 下面是code:
: #!/usr/bin/perl -w
: use strict;
: use CGI;
: use CGI::Carp qw(fatalsToBrowser);
: my $teststring = 'This is content from Perl';
: my @testarray = ('item1', 'item2', 'item3');
: print <
1 (共1页)
进入BuildingWeb版参与讨论
相关主题
在CGI程序中有何好方法返回HTMLHelp me with a stupid question.
apache+php+mysql的文件上传问题一个perl初级问题
how to avoid security holes for perl CGI code using checkbo (转载)**********Help Needed! 怎样在最短的时间内学会CGI??急!!!************
Re: 求助: 关于Perl and Javas怎么样在个人主页上运行CGI?
Help on View DB talbe using Perl CGIwhat is cgi?
Perl CGI to MySQL problem[转载] Perl CGI and Excel files
[转载] Perl for programmers(10): A template for CGI file那位大虾知道那里有免费空间支持ASP,PHP,CGI或PERL?
perl cgis: how to send back frame webpage?谁推荐一个CGI/PERL写的论坛程序?最好是汉化过的
相关话题的讨论汇总
话题: perl话题: javascript话题: end话题: cgi话题: testarray