<!DOCTYPE html> <html> <head> <title>Site</title> <meta charset="utf-8"> <script> window.onload = function () { var radio = document.querySelectorAll("input[id^='shipment_id_']:not([id='shipment_id_1'])"); for (var i=0; i<radio.length; i++) {radio[i].disabled=!0} } </script> </head> <body> <input id="shipment_id_1" type="radio"> <input id="shipment_id_2" type="radio"> <input id="shipment_id_3" type="radio"> </body> </html>