function creatediv(id, width, height, left, top) {
var newdiv = document.createElement('newdiv');
//newdiv.setAttribute('id', id);
newdiv.style.width = 100;
newdiv.style.height = 300;
newdiv.style.position = "absolute";
if (width) {
newdiv.style.width = 100;
}
if (height) {
newdiv.style.height = 300;
}
if ((left || top) || (left && top)) {
newdiv.style.position = "absolute";
if (left) {
newdiv.style.left = left;
}
if (top) {
newdiv.style.top = top;
}
}
newdiv.style.background = "#fff";
newdiv.style.border = "4px solid #000";
document.getElementById('dvallitems').style.display = 'block'
newdiv.appendChild(document.getElementById('dvallitems'));
newdiv.style.display = 'block';
//document.body.appendChild(document.getElementById('dvallitems').style.display = 'block');
}
Friday, March 26, 2010
Create div at run time using javascript
Labels:
asp.net,
c#,
client side,
create,
create div,
div,
how to,
javascript,
runtime,
using
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment