function smile ()
{
document.getElementById("textfield_width").value = width;
//set the elements with id "textfield_width" some value the value of the variable width-->
document.getElementById("textfield_height").value = height;
// set the elements with id "textfield_height" some value the value of the variable height -->
}
lanhaibibo -2 Newbie Poster
Recommended Answers
Jump to Postthe comments are included,
this is not a function, this is an explanation of how part of a function could be coded.
It is incorrect, the explanation refers to "elements with the id", when ID is singular and multiple elements cannot have the same ID,
throw it away and get …
All 4 Replies
Troy III 272 Posting Pro
lanhaibibo -2 Newbie Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
almostbob 866 Retired: passive income ROCKS
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.