Question
Can I replace string with a variable in innerhtml?
Hi,
I have the following script:
function change2(e)
{
var userInput = document.getElementById(e).innerHTML;
userInput++;
document.getElementById(e).innerHTML = userInput;
}
</script>
being called via:
echo "<a href=\"#\"><img src=\"./../Up.JPG\" border=\"0\" onclick=\"change2('".$idkey."');\"></a>";
echo " ".$num_rows1."</form>";
I basically want 'e' to be dynamic accepting the id passed into it.
Thanks in advance.
