I want to append some texts to my document, and clicking on these texts launches some functions with different string arguments.

I don't know why the following fonction does not make `onclick` work:

```
var strings = ["string1", "string2", "string3"];

function show (s) {
    alert(s);
}

for (var i = 0; i < strings.length; i++) {
    var elt = document.createElement('text');
    elt.innerHTML = strings[i];
    elt.onmouseover = "";
    elt.style = "cursor: pointer;";
    var s = "show(" + "'" + strings[i] + "'" + ")";
    elt.onclick = s;  
    document.body.appendChild(elt);
}

```

Here is the [JSBin](http://jsbin.com/karilo/6/edit?html,js,output).

Additionally, I want to put `string1`, `string2` and `string3` line by line (ie, inserting `<br>` among them), and always inside the `<div class="padding">BEGIN ...</div>` (I don't think currently it is inside this `div`). Does anyone know how to realise this?