+3 votes
in Class 12 by kratos

Write the code to display a form along with the javascript as shown below. User should be able to select a picture after clicking on browse button and when he presses “click” button, the picture should be displayed.

Next the user should be able to enter value of image height and width and when he presses “apply” button, the size of picture should change as shown:

1 Answer

+4 votes
by kratos
 
Best answer

function first() { document.f1.img1.src=document.f1.f2.value } function second() { document.f1.img1.width=document.f1.t2.value document.f1.img1.height=document.f1.t1.value } Select the image that you want to display

image

specify the new height
specify the new width

...