Simple windowed application: Difference between revisions
Content added Content deleted
m (update for newer Gtk version) |
(Undo revision 338229 by Mellington (talk)) |
||
Line 1,810: | Line 1,810: | ||
} |
} |
||
}</lang> |
}</lang> |
||
<html> |
|||
<head> |
|||
<title>Simple Window Application</title> |
|||
</head> |
|||
<body> |
|||
<br>         |
|||
<script type="text/javascript"> |
|||
var box = document.createElement('input') |
|||
box.style.position = 'absolute'; // position it |
|||
box.style.left = '10px'; |
|||
box.style.top = '60px'; |
|||
document.body.appendChild(box).style.border="3px solid white"; |
|||
document.body.appendChild(box).value = "There have been no clicks yet"; |
|||
document.body.appendChild(box).style['width'] = '220px'; |
|||
var clicks = 0; |
|||
function count_clicks() { |
|||
document.body.appendChild(box).remove() |
|||
clicks += 1; |
|||
document.getElementById("clicks").innerHTML = clicks; |
|||
}; |
|||
</script> |
|||
<button type="button" onclick="count_clicks()"> Click me</button> |
|||
<pre><p> Clicks: <a id="clicks">0</a> </p></pre> |
|||
</body> |
|||
</html> |
|||
=={{header|Julia}}== |
=={{header|Julia}}== |