In my code, onclick function of addDvcPeople() works fine without form. But once form added, the onclick function of addDvcPeople() works fail. Here is the code without form which works fine:
<div class="dvcOnShlv" id="dvcOnShlv">
<!--<form action="modify_idc_addDVC.php?act=add&table=IDC" method="POST">-->
<table border="1px" cellspacing="0" id="staTable">
<tr>
<h2 align="center">IDCtable</h2>
</tr>
<tr>
<td style="width:15%" id="addDvcWorker">engineer<br /><input type="button" id="addDvcPeople" onclick="addDvcPeople()" value="addpeople"></td>
</tr>
</table>
<!--</form>-->
</div>
My addDvcPeople() code is:
<script>
function addDvcPeople()
{
alert("test");
}
</script>
Once "form" sentence is added, function addDvcPeople() did nothing. I don't know why.Who can help me ?