从html中的combobox读取值到perl程序 [英] Reading Value from combobox in html to perl program
问题描述
嗨朋友们,
我有一个html页面,其中der是一个包含一些值的下拉组合框。当一个人选择一个值按下提交按钮时,会调用一个perl程序,我必须在本地变量中读取组合框中选择的值。
< b> html代码:
< html>
< head>
< / head>
< body>
< form name =form1action =/ cgi-bin / read.pl method =post>
< select name =selectFile>
< option value =one> One< / option>
< option value =two>两个< /选项>
< / select>
< input type =submit value =发送name =sbmt>
< / form>
< / body>
< / html>
Perl代码:
在perl m访问值为:
$ FileName = $ query-> param(''selectFile''); / / selectFile是的名称组合框在HTML中。
如果我尝试打印$ FileName,它不会打印任何东西。
可以any1请帮帮我..
谢谢
Rahul
Hi friends,
I Have a html page in which der is a dropdown combobox which contains some value. when a person selects a value n press submit button, a perl program is called in which i have to read the value selected in the combobox in a local variable.
html code:
<html>
<head>
</head>
<body>
<form name="form1" action="/cgi-bin/read.pl" method="post">
<select name="selectFile">
<option value="one">One</option>
<option value="two">Two</option>
</select>
<input type="submit" value="Send" name="sbmt">
</form>
</body>
</html>
Perl Code:
In perl m accessing the value as:
$FileName = $query->param(''selectFile''); // selectFile is the name of the combobox in html.
If i try to print $FileName, it doesnt print anything.
can any1 help me please..
Thanks
Rahul
推荐答案
FileName =
FileName =
query-> param(''selectFile''); // selectFile是html中组合框的名称。
如果我尝试打印
query->param(''selectFile''); // selectFile is the name of the combobox in html.
If i try to print
FileName,它不会打印任何东西。
可以帮我一个...
谢谢
Rahul
FileName, it doesnt print anything.
can any1 help me please..
Thanks
Rahul
这篇关于从html中的combobox读取值到perl程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!