css problem in ie
Hi,
I am adding a text node by my java script code and specifing a css class
blackText for the text. It works well in mozilla but not working in IE.
var div=document.createElement('div');
div.setAttribute("class", "blackText");
textWhere = document.createTextNode("Where:");
div.appendChild(textWhere);
What is the issue
Waiting for your response
Thanks
[418 byte] By [
Rojara] at [2007-11-26 14:56:18]

# 1
Hi Friend,
Try the below code. Its working in ie.
Code:
<html>
<head>
<style>
.blackText
{
color:"red";
}
</style>
</head>
<body id="bd">
<script>
var div=document.createElement('a');
//div.setAttribute("class", "blackText");
div.className = 'blackText';
textWhere = document.createTextNode("Where:");
div.appendChild(textWhere);
bd.appendChild(div);
</script>
</body>
</html>
Regards,
Maha