如何用Perl Button替换html表

时间:2019-03-15 12:48:29

标签: html perl

大家好,我是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表吗?

1 个答案:

答案 0 :(得分:-1)

我认为这更多是一个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