从html中的combobox读取值到perl程序 [英] Reading Value from combobox in html to perl program

查看:75
本文介绍了从html中的combobox读取值到perl程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我有一个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屋!

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