提交按钮值失败? [英] Submit button value fails?

查看:84
本文介绍了提交按钮值失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

----------

在下面的脚本中,我尝试使用perl cgi传递提交按钮中的值。但是在我的情况下它失败。提前感谢任何帮助。



我验证的东西:



在浏览器中,我发现提交按钮无效加载我已经通过的值。相反,它显示的值为提交。



http://ad.sd.anog.com/cas/dev/rard/ 1an / bin / rsdb.cgi?popup1 = landlord& submit = submit



供您参考:



我的%site =(

Place1 => [qw(place1)],

Place2 => [qw(place2)],

Place3 => [qw(place3)],

Place4 => [qw(place4)],

);



浏览器中的预期内容:



http://ad.sd.anog.com/cas/dev/rard/1an/ bin / rsdb.cgi?popup1 = landlord& submit = place2



我尝试过:

< b r />

我试过的代码:

#!/ usr / local / bin / perl -wT
使用CGI qw /:standard / ;
使用严格;
使用CGI;
我的行动;
print start_form(-method =>'GET', - action => $ action);
print< br>  网站 ;
print popup_menu(
-name =>'popup1',
-method =>'GET',
-values => [sort keys%site],
);
print     ;

print submit(-name =>'submit', - values =>place2);
print end_form;

if(submit eq'resent')
{
$ action =rsdb.cgi;
}

解决方案

action;
print start_form(-method =>'GET', - action =>'/ blockquote>

action);
print< br>  网站 ;
print popup_menu(
-name =>'popup1',
-method =>'GET',
-values => [sort keys%site],
);
print     ;

print submit(-name =>'submit', - values =>place2);
print end_form;

if(submit eq'resent')
{


action =rsdb.cgi;
}


----------
In the below script i tried to pass the values in the submit button using perl cgi.But it fails in my case.Thanks in advance for any help.

Things which i verified :

In the browser i found the submit button fails to load the value which i had passed.Instead it shows the value as submit.

http://ad.sd.anog.com/cas/dev/rard/1an/bin/rsdb.cgi?popup1=landlord&submit=submit

For your reference:

my %site = (
Place1 => [ qw(place1) ],
Place2 => [ qw(place2) ],
Place3 => [ qw(place3) ],
Place4 => [ qw(place4) ],
);

Expected thing in the browser:

http://ad.sd.anog.com/cas/dev/rard/1an/bin/rsdb.cgi?popup1=landlord&submit=place2

What I have tried:

Code which i had tried:

    #!/usr/local/bin/perl -wT
    use CGI qw/:standard/;
    use strict;
    use CGI;
    my $action;
    print start_form(-method=>'GET',-action=>$action);
    print " <br>  Site  ";
    print popup_menu(
           -name    => 'popup1',
           -method => 'GET',
            -values=>[sort keys %site],
             );
    print "           ";
    
    print submit(-name=>'submit',-values=>"place2");
    print end_form;
    
    if(submit eq 'submit')
    {
    $action="rsdb.cgi";
    }

解决方案

action; print start_form(-method=>'GET',-action=>


action); print " <br>  Site  "; print popup_menu( -name => 'popup1', -method => 'GET', -values=>[sort keys %site], ); print "          "; print submit(-name=>'submit',-values=>"place2"); print end_form; if(submit eq 'submit') {


action="rsdb.cgi"; }


这篇关于提交按钮值失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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