Alex_dark74,
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
$(function () {
$('[id^="size_"]')
.bind("change keyup",function () {
var width = $("#size_x").val(), height = $("#size_y").val();
width && height && $("#pic").css({"width": width,"height": height});
})
})
</script>
</head>
<body>
<img id="pic" src="http://bxslider.com/images/730_200/tree_root.jpg" /><br>
<input id="size_x" type="text" size="10"/> х <input id="size_y" type="text" size="10"/> мм.
</body>
</html>