codice:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Disabilita</title>
<script type="text/javascript">
var disabilita = "gruppo1";
var tuaVariabile = 131;
onload = function () {
if (tuaVariabile > 0) {
for (var oEl, nIdx = 0, aColl = document.getElementsByTagName("input"), nLen = aColl.length; nIdx < nLen; oEl = aColl[nIdx], oEl.getAttribute("type") === "radio" && oEl.getAttribute("name") === disabilita && (oEl.disabled = true), nIdx++);
}
};
</script>
</head>
<body>
<form name="tuoForm1">
<input type="radio" name="gruppo1" value="valore1" />
Valore 1
<input type="radio" name="gruppo1" value="valore2" />
Valore 2
<input type="radio" name="gruppo1" value="valore3" />
Valore 3
<input type="radio" name="gruppo1" value="valore4" />
Valore 4
</p>
<input type="radio" name="gruppo2" value="valore1" />
Valore 1
<input type="radio" name="gruppo2" value="valore2" />
Valore 2
<input type="radio" name="gruppo2" value="valore3" />
Valore 3
<input type="radio" name="gruppo2" value="valore4" />
Valore 4
</p>
</form>
</body>
</html>