how to add cursor type on a table row using javascript?
var tbl = document.getElementById(TABLE_NAME);
var nextRow 开发者_JAVA技巧= tbl.tBodies[0].rows.length;
row.setAttribute('style', "cursor: pointer;");
This will add double click event on table row.right..!!!But i m facing problem in internet explorer.working perfect in all other browsers. For adding style i am handling this:
var cell2 = row.insertCell(1);
var browser=navigator.appName; if(browser == "Microsoft Internet Explorer")
{
cell2.style.setAttribute("cssText", "color:black; width:300px;");
}
else
{
cell2.setAttribute("style", "color:black; width:300px;");
}
how to add double click event which will work on internet explorer too...
Use:-
cell2.style.cssText = "color:black; width:300px;"
for IE.
enter code here
var cell2 = row.insertCell(1);
var browser=navigator.appName; if(browser == "Microsoft Internet Explorer")
{
cell2.style.setAttribute("cssText", "color:black; width:300px; cursor:pointer;");
}
else
{
cell2.setAttribute("style", "color:black; width:300px; cursor:pointer;");
}
will set my cursor pointer... LOL anyways thanks friends..
精彩评论