function creatlay() {
aa=document.createElement("<div className='css2' id='a' style='position:absolute;left:200px;top:200px;width: 200px; height:200px;z-index:3;border:1px solid red;'></div>");}
再请教高手,我这样写,建立的是一个固定的图层,请问如何写才能使建立的图层成为可以拖动的图层呢?
aa=document.createElement("<div className='css2' id='a' style='position:absolute;left:200px;top:200px;width: 200px; height:200px;z-index:3;border:1px solid red;'></div>");}
再请教高手,我这样写,建立的是一个固定的图层,请问如何写才能使建立的图层成为可以拖动的图层呢?
aa=document.createElement("<div className='css2' id='a' style='position:absolute;left:200px;top:200px;width: 200px; height:200px;z-index:3;border:1px solid red;'></div>");
aa.innerText = "sdfsdf";
document.body.insertBefore(aa);
}
我是这样建立的图层,请问如何才能建立一个包含表格的图层,并能够正确的显示出来?
如果写成:
aa=document.createElement("<div className='css2' id='a' style='position:absolute;left:200px;top:200px;width: 200px; height:200px;z-index:3;border:1px solid red;'><table><tr><td>hhhhhhh</td></tr></div>");
document.body.insertBefore(aa);
并不能将表格显示出来!!我该怎么改阿??
function creatlay() {
aa=document.createElement("<div className='css2' id='a' style='position:absolute;left:200px;top:200px;width: 200px; height:200px;z-index:3;border:1px solid red;'></div>");
aa.innerHTML = "<table><tr><td>hhhhhhh</td></tr></table>";
document.body.insertBefore(aa);}