<head>
<title>Документ без названия</title>
<script>
function choiceFirstForm() {
var newSite = getElementById("newSite");
var psd = getElementById("psd");
var template = getElementById("template");
if(newSite.click()) {
newSite.setAttribute(checked)
psd.removeAttribute(checked)
template.removeAttribute(checked)
}
}
function firstChoice() {
if(newSite.hasAttribute(checked)) {
var firstForm = getElementByName("firstForm");
var newSite = getElementById("newSite");
var div = document.createElement("div");
div.innerHTML = "Вы выбрали Новый";
this.parentNode.insertBefore(div, this.nextSibling);
}
}
</script>
</head>
<body>
<form name="firstForm">
<input type="radio" name="create" id="newSite" onClick="choiceFirstForm()"/><br />
<input type="radio" name="create" id="psd" onClick="choiceFirstForm()"/><br />
<input type="radio" name="create" id="template" onClick="choiceFirstForm()"/><br />
<a href="#" onClick="firstChoice()">Выбрать</a>
</form>
</body> |