如何用Perl按钮替换HTML表



大家好,我是新来的perl和脚本,我有此代码:

print << "_END_HTML1_";
<div id="tabel">
<table style="width:10%">
  <tr>
    <th><input type=button value="Stop" onclick="document.getElementById('dostop').value='ON'; document.getElementById('formHiddenValues').submit();"/></th>
    <th><input type=submit value="Refresh" ></th> 
  </tr>
</table>
</div>
<p><i>This window will be automatically refreshed after 10 seconds ...</i></p>
_END_HTML1_
system("cat /srv/www/htdocs/wwwrun-rw/$targetSystem-install_progress.txt 2>/dev/null");
print "</pre>n";
if ( "$installfinish" eq "1" ) {
    $Params{'currentstep'} = 4;
    print "<p>Press Finish to acknowledge the operation result and reset the system state to IDLE.</p>";
    print "<input type=submit value='Finish' >n";
 }

任何人都可以告诉我如何用"完成"按钮替换所有html表?

我认为这更像是一个JS/HTML问题。这是我的建议。

print <<EOF;
<script>
var replacement = "<p>This is a replacement</p>";
</script>
<input type=submit value='Finish' onClick='document.getElementById("tabel").innerHTML = replacement;'>
EOF

最新更新