How do I create an HTML element with attributes and events using JavaScript? -


i working on school project on discovering javascript , stuck element creating, know how need implement this.

create element:

var element = document.createelement('table'); 

adding attribute:

element.setattribute( "id", "table1" ); 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -