本文介绍了提交按钮值失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! ---------- 在下面的脚本中,我尝试使用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 我尝试过: 我试过的代码: #!/ 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=submitFor 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=place2What 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"; } 这篇关于提交按钮值失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-23 00:19