html5 - Submit button setting a value in javascript -
i have make button has value javascript variable
<script> for(i=0; < count; i++) { var row = table.insertrow(table.rows.length); var cell = row.insertcell(0); cell.innerhtml = '<input type="submit" value=i onclick="somefunc(this.value)" />'; } </script>
but when open page value i. how set value of in button.
wouldn't
cell.innerhtml = '<input type="submit" value="'+ + '" onclick="somefunc(this.value)" />';
so use value of instead of string i?
Comments
Post a Comment