JSFiddle - React, Tailwind, and code Playground
by bohdantheone
HTML
<form action="" method="post" id="addnews" name="addnews">
<input type="button" name="form[mod]" value="addnews" >
<input name="ok" type="submit" class="buttons" value=" Добавить ">
</form>
<script language="JavaScript">
document.forms.addnews.elements[0].value="preview"; // Значение первого элемента
</script>