var del = document.createElement(\'input\'); del.type = \'button\'; del.name = \'delll\'; del.value = \'del\'; del.onClick = \'alert(\"hi javascript\")\';
set the onclick (all lower case) to an anonymous function
del.onclick = function(){ alert('hi javascript');};
note the function is not in quotes like other attributes