JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<fieldset>
<legend><h3>Rediger eller slet blogindlæg</h3></legend>
<table cellpadding="2" id="rediger_blog_1">
<tr>
<td class="headline">Dette er en overskrift!</td>
<td class="option"><input class="option" type="submit" value="Rediger" onclick="show_edit('rediger_blog');"/></td>
<td class="option"><input class="option" type="submit" value="Slet"/></td>
</tr>
</table>
<table cellpadding="2" id="rediger_blog_2" style="display:none;">
<tr>
<td>Overskrift:</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>Indhold:</td>
<td><input type="text" /></td>
</tr>
<tr>
<td><input type="submit" value="Gem indlæg" class="save" onclick="hide_edit('rediger_blog');"/></td>
<td> </td>
</tr>
</table>
</fieldset>
</form>
JavaScript
function show_edit(ID) {
$("#"+ID+"_1").hide();
$("#"+ID+"_2").show();
}
function hide_edit(ID) {
$("#"+ID+"_2").hide();
$("#"+ID+"_1").show();
}