DIR : /home/kozerus/public_html/konet/ko_form.html
/home/kozerus/public_html/konet
<body bgcolor=linen>
<hr color=white>
<img src=/imgs/btn/koeye.png onclick="toggle('div_form',''); return false;" height=20 border=0>div_form
<hr color=goldenrod>
<div id="div_form" >
<h1>div_form</h1>
<form id="form" name=form type="POST" action="/ko/ko.php?form" >
<!-- <form id="form" name=form type="POST" action="ka12:8000/ko.php?ko_coffeeshop?fmt=json" > -->
<input id=form_fmt name=form_fmt type=radio value="json">json
<input id=form_fmt name=form_fmt type=radio value="txt">txt
<input id=form_fmt name=form_fmt type=radio value="csv">csv
<input id=form_fmt name=form_fmt type=radio value="psv">psv
<input id=form_fmt name=form_fmt type=radio value="html">html
<table id=table_form>
<tr><td>fmt</td><td><input id=fmt type=text name=fmt value=""></td></tr>
<tr><td>todo</td><td><input id=todo type=text name=todo value=""></td></tr>
<tr><td>step</td><td><input id=step type=text name=step value=""></td></tr>
<tr><td>x</td><td><input id=x type=text name=x value=""></td></tr>
<tr><td>y</td><td><input id=y type=text name=y value=""></td></tr>
<tr><td>t</td><td><input id=t type=text name=t value=""></td></tr>
<tr><td>xlim</td><td><input id=fmt type=text name=xlim value=""></td></tr>
<tr><td>ylim</td><td><input id=ylim type=text name=ylim value=""></td></tr>
<tr><td>date</td><td><input id=date type=date name=date value=""></td></tr>
<tr><td>time</td><td><input id=time type=time name=form_time value=""></td></tr>
<tr><td>color</td><td><input id=color type=color name=form_color value=""></td></tr>
</table>
<input id="submit" type="submit">
<!--
<div id="div_form_fname"> </div>
<label for="fname">First name: </label>
<input id="fname" type="text"></input>
<div id="div_form_lname"> </div>
<label for="lname">Last name: </label>
<input id="lname" type="text"></input>
<div id="div_form_submit"> </div>
<input id="submit" type="submit">
-->
</form>
<p></p>
</div id=div_form_end>
<hr color=white>
<script id="script_form">
const form = document.querySelector('form');
const fname = document.getElementById('fname');
const lname = document.getElementById('lname');
const para = document.querySelector('p');
form.onsubmit = function(e) {
if (fname.value === '' || lname.value === '') {
e.preventDefault();
para.textContent = 'both';
}
}
</script>
//