JavaScript question
Page 1 of 1
JavaScript question
Is it possible to program a code that allows a attack button to automatically do hp like these examples
- Code:
[code]
document.getElementById("attack").click(); = dragon.hp = dragon.hp - 10;
[size=13][code]document.getElementById("attack").onclick = function(){
dragon.hp -[/code][/size]
[size=13][code]document.getElementById("attack").addEventListener('click', function(){
dragon.hp -= 10;
});[/code]
[code]dragon.hp -= 10;[/code]
[code]dragon.hp = dragon.hp - 10;[/code][
<a ..... onClick="deductHpPoints()">...</a>[/code][code] Function deductHpPoints()
{
//deduct logic
}[/code]
[color=#000000]
Guest- Guest
Similar topics
» Javascript Pages Question
» Question about Rainbow Username JavaScript
» javascript
» javascript
» javascript
» Question about Rainbow Username JavaScript
» javascript
» javascript
» javascript
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum