html head title Bla-bla-bla title script function makeurl obj url http

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<head>
<title>Bla-bla-bla</title>
<script>
function makeurl(obj){
url = "http://bla-bla-bla.org"
for(var i = 0; i < obj.elements.length; ++i )
{
field = obj.elements[i]
url += '/' + field.name + '=' + field.value
}
alert(url);
}
</script>
</head>
<body>
<form method="get" onSubmit="makeurl(this)">
<input name="input" type="text"/>
<input name="submit" type="submit" value="Send"/>
</form>
</body>
</html>