<html>
<head>
<meta charset="UTF-8">
<title> Динамическое создание страниц </title>
</head>
<body>
<script LANGUAGE="JavaScript">
function mov(form, dat1) {
var myindex = form.dif.selectedIndex;
location.href = (form.dif.options[myindex].value);
}
</script>
<form>
<select NAME="dif" size="1">
<option value="dat.html?id=pic1">Рисунок 1</option>
<option value="dat.html?id=pic2">Рисунок 2</option>
<option value="dat.html?id=pic3">Рисунок 3</option>
</select>
<INPUT onclick="mov(this.form, window)" type=button value=Смотреть>
</form>
<script language="JavaScript" src="bild.js"></script>
</body>
</html>
function GetParam(search, name){
name=name+"=";
var gp="";
if (search!='') {
if (search.indexOf (name, 0)!=-1){
var startpos=search.indexOf(name, 0)+name.length;
var endpos=search.indexOf("&",startpos);
if (endpos<startpos) {endpos=search.length;}
var gp=p.substring(startpos,endpos);
} else {
gp=""; }
}
else {
gp="";
}
return gp;
}
var p=window.location.search;
var gp=GetParam(p, "id");
if (gp=="") {gp="default";}
document.write('<img src="'+gp+'.jpg">');