You can divide any variable as much as you want, it won't touch your HTML document, ever. Your layout cannot be "interrupted" (what is it? :-)), but it can be modified only if you assign new values to some elements of your DOM document. You either change the width of your image (by modifying its
width
property) or not; you cannot requires to change something and change nothing at the same time. The change in width always change some layout, but this change can be limited to small part of the document, which totally depends on your, well… layout. If has nothing to do with JavaScript at all, but depends entirely on your HTML and CSS.
As to your question about forms or inputs: you don't need any forms or input controls to invoke a JavaScript. Any event can be used (click, hover, you name it), including such basic one as the event of loading the page,
onload
, please see:
http://www.w3schools.com/jsref/event_onload.asp[
^].
This is just basic information, only on part related to your question. It won't help you much if you won't learn the very basics of HTML, CSS, JavaScript and their functionality. I feel you really need it, and perhaps from the very beginning.
This is one of the places to start:
www.w3schools.com[
^].
Additionally, you will need to check with the standards. You can easily find all the documentation.
—SA