Español
<!--Agregue el siguiente código al área <body>--> <SCRIPT LANGUAGE="JavaScript"> <!--// function countChoices(obj) { max = 2 = obj.form.box1.checked; ; cuadro2 = obj.form.box2.checked; box3 = obj.form.box3.checked; recuento = (cuadro1? 1: 0) + (cuadro2? 1: 0) + (cuadro3? 1: 0); > max) { alert("Lo sentimos, ¡solo puedes seleccionar elementos " + max + "!"); obj.checked = false } } //--> </script> <form name="form"> Por favor, máximo; Seleccione 2 elementos: <p> <input type=checkbox name=box1 onClick="countChoices(this)"> Seleccione el elemento 1 <p> <input type=checkbox name=box2 onClick="countChoices(this)"> Seleccione el elemento 2 <p> <input type=checkbox name=box3 onClick="countChoices(this)"> Seleccione el elemento 3 <p> </form>