|
# *******************************************************************
#
# *******************************************************************
sub InputTag {
local( $strType ) = $_[0];
local( $strName ) = $_[1];
local( @InputOption ) = split(/:/, $_[2]);
local( $strRet ) = "";
$strRet = "<INPUT type=$strType name=$strName";
for ( 0 .. $#InputOption ) {
if ( $_ == 0 ) {
if ( $InputOption[$_] eq "0" ) {
$strRet = $strRet . " readonly";
}
}
elsif ( $_ == 1 ) {
if ( $InputOption[$_] ne "" ) {
$strRet = $strRet . " class=$InputOption[$_]";
}
}
elsif ( $_ == 2 ) {
if ( $InputOption[$_] ne "" ) {
$strRet = $strRet . " maxlength=$InputOption[$_]";
}
}
elsif ( $_ == 3 ) {
if ( $InputOption[$_] ne "" ) {
$strRet = $strRet . " size=$InputOption[$_]";
}
}
else {
}
}
for ( 3 .. $#_ ) {
$strRet = $strRet . " $_[$_]";
}
if ( $Form{ $strName } ne "" ) {
$strRet = $strRet . " value='$Form{ $strName }'";
}
$strRet = $strRet . ">";
$strRet;
}
| |