diff options
Diffstat (limited to 'test/js')
-rw-r--r-- | test/js/event-onclick-insert.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/js/event-onclick-insert.html b/test/js/event-onclick-insert.html new file mode 100644 index 000000000..62b9d7ee8 --- /dev/null +++ b/test/js/event-onclick-insert.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<body> + +<button onclick="add_paragraph()">Click me!</button> + +<script> +function add_paragraph() { + var paragraph = document.createElement("P"); + var textnode = document.createTextNode("New paragraph!"); + paragraph.appendChild(textnode); + document.body.appendChild(paragraph); +} +</script> + +</body> +</html> + |