<script>
function addListeners() {
if(window.addEventListener) {
document.getElementById('').addEventListener("DOMContentLoaded", btn1func, false);
} else if (window.attachEvent) {
document.getElementById('').attachEvent("DOMContentLoaded", btn1func);
}
function btn1func() {
alert(this.id + "Anything")
}
}
window.onload = addListeners
</script>