I need help again. Displaying ima开发者_如何学Goges on gridview is never been a problem to me but how can i enlarge my image onmouseover event in gridview?
Use javascript or jquery to perform the task.
erm...
If you will enlarge those images to a default heightXwidth i will consider using css and adding that class in the mouseover event... and removing it in the mouseout...
if you use JQuery you can add that css class like:
$('#elementID').addClass('enlarged'); <-- enlarged class resizes my image
and to remove the added class just:
$('#elementID').removeClass('enlarged');
if you dont use any javascript library, you can add a class using:
document.getElementById("elementID").className += " enlarged";
to remove it:
document.getElementById("elementID").className = document.getElementById("elementID").className.replace(/\benlarged\b/','')
精彩评论