|
There are a few different ways to go about this. Here's one method.
<html>
<head>
<SCRIPT type="text/javascript">
function doit()
{
var greeting="I like "
alert(greeting + document.aform.city.value
Notice I changed out the named of the input boxes with the names "city" and "state". I then erased the first alert box from Primer 19's example and it pretty much ran from there. Close this window to return to JavaScript Primer |