Это можно сделать с помощью jQuery, который является JavaScript библиотекой и так далее: вы также можете использовать простой JavaScript.
JQuery:
var $image = $('#imageID'), //Or some other selector
imgWidth = $image.width(),
imgHeight = $image.height();
$('#imageID').hover(function() {
//The mouseover
$(this).width( imgWidth * 2);
$(this).height( imgHeight * 2);
}, function() {
$(this).width( imgWidth );
$(this).height( imgHeight );
});
Простой JavaScript:
Смотрите пример здесь: http://jsfiddle.net/axpVw/
var image = document.getElementById('imageID'),
imageWidth = image.width,
imageHeight = image.height;
image.onmouseover = function() {
image.width = 2 * imageWidth;
image.height = 2 * imageHeight;
}
image.onmouseout = function() {
image.width = imageWidth;
image.height = imageHeight;
}