JQuery datepicker ウィジェット ( http://jqueryui.com/datepicker/#inlineに類似) をフォームに追加し、フォーム送信時に gif をロードするのを手伝ってもらえますか? (私は以下のコードを所有していません。サポート フォーラムから取得し、その上に構築しています)。いくつかの助けをいただければ幸いです。
事前に感謝..
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser); # Remove this in production
use win32::OLE;
my $who;
my $runCmd;
my $retVal;
my $fileCon;
my $copyCmd;
my $q = new CGI;
my $statusURL;
my $iframeCode;
print $q->header();
# Output stylesheet, heading etc
output_top($q);
if ($q->param()) {
# Parameters are defined, therefore the form has been submitted
display_results($q);
output_end2($q);
} else {
# We're here for the first time, display the form
output_form($q);
output_end($q);
}
# Output footer and end html
exit 0;
#-------------------------------------------------------------
# Outputs the start html tag, stylesheet and heading
sub output_top {
my ($q) = @_;
print $q->start_html(
-title => 'Deployment Dashboard',
-bgcolor => 'white',
-style => {
-code => '
/* Stylesheet code */
body {
font-family: verdana, sans-serif;
}
h2 {
color: darkblue;
border-bottom: 1pt solid;
width: 100%;
}
div {
text-align: left;
color: steelblue;
border-top: darkblue 1pt solid;
margin-top: 4pt;
}
a {
text-align: left;
color: steelblue;
}
th {
text-align: right;
padding: 2pt;
vertical-align: top;
}
td {
padding: 2pt;
vertical-align: top;
}
/* End Stylesheet code */
',
},
);
print $q->h2("Deployment Dashboard");
}
# Outputs a footer line and end html tags
sub output_end {
my ($q) = @_;
print $q->div("Gil Gbzy Ipe");
print $q->end_html;
}
sub output_end2 {
my ($q) = @_;
print $q->end_html;
}
# Displays the results of the form
sub display_results {
my ($q) = @_;
#print $q->param('Input_IP');
my @values = split(' ', $q->param('Input_IP'));
print <<END;
<table border="1">
<tr>
<td></td>
<td>checkpoint 1<br></td>
<td>checkpoint 2<br></td>
<td>checkpoint 3<br></td>
<td>checkpoint 4<br></td>
<td>checkpoint 5<br></td>
<td>checkpoint 6<br></td>
<td>checkpoint 7<br></td>
</tr>
END
foreach my $val (@values) {
print " <tr>";
print " <td>$val</td>";
print " <td>1</td>";
print " <td>2</td>";
print " <td>3</td>";
print " <td>4</td>";
print " <td>5</td>";
print " <td>6</td>";
print " <td>7</td>";
print " </tr>";
}
print "</table>";
}
# Outputs a web form
sub output_form {
my ($q) = @_;
print $q->start_form(
-name => 'main',
-method => 'POST',
);
print $q->start_table;
print $q->Tr(
$q->td('Ip Addresses:'),
$q->td(
$q->textarea(-name=>'Input_IP',
-default=>'
1.1.1.1
2.2.2.2',
-rows=>5,
-columns=>40,
)
)
);
print $q->Tr(
$q->td($q->submit(-value => 'Submit')),
$q->td(' ')
);
print $q->end_table;
print $q->end_form;
}