html
<script type ="text/javascript"src="validate"></scpipt>
<script type ="text/javascript"src="showdata"></scpipt>
onsubmit= checkform (); returnfalse">
</form>
<input type="submit" name="Save" id="Save"value="Save"onclick="showdataform();"/>
<input type="submit" name="Close" id="Close"value="Close"/>
- f.js
- (3.43 KiB) Downloaded 37 times
javascript
function showinfo()
{
alert(document.getElementById('excise').value);
}
function checkform()
{
if(document.getElementById('excise').value=="")
{
alert ('กรุณาระบุ...............');
}
else if(document.getElementById('name_pk').value=="")
{
alert ('กรุณากรอกชื่อ');
}
else
{
showdataform();
}
}
javascript
function showdata ()
{
var txtdata="เรียน ...... "+document.getElementById('excise').value;
txtdata +="\nชื่อ "+document.getElementById('name_pk').value;
alert (txtdata);