Esta es una prueba. edited by
Thanks
- MultiQuote
- Quote
- Edit
- Delete
- Ip
By
input[type="radio"] {
-webkit-appearance: none;
border-radius: 100%;
display: inline-block;
text-align: center;
background: #fff;
border: 1px solid #ccc;
height: 18px;
width: 18px;
vertical-align: -5px;
margin-right: 3px;
position: relative;
overflow: hidden;
cursor: pointer;
}
input[type="radio"]:hover {
border-color: #69c;
}
input[type="radio"]:after, input[type="radio"]:before, input[type="radio"]:checked:after {
content: ".";
font-size: 0;
border-radius: 100%;
position: absolute;
top: 3px;
left: 3px;
height: 10px;
width: 10px;
}
input[type="radio"]:after {
background: #69c;
top: 8px;
left: 8px;
height: 0;
width: 0;
transition-property: height,width,top,left;
transition-duration: 150ms;
}
input[type="radio"]:before {
background: #ccc;
}
input[type="checkbox"] {
-webkit-appearance: textarea;
background: #818181;
height: 16px;
width: 32px;
border-radius: 9px;
margin: 0 10px;
vertical-align: -5px;
position: relative;
transition: .2s background-color;
}
input[type="checkbox"]:after {
content: "";
width: 18px;
height: 18px;
position: absolute;
display: block;
background: #fff;
border-radius: 50%;
top: -1px;
left: -6px;
box-shadow: 0 0.0625rem 0.1875rem 0.0625rem rgba(0,0,0,.4);
transition: .2s left, .2s box-shadow;
}
input[type="checkbox"]:checked:after {
content: "";
left: calc(32px - 12px);
}
input[type="checkbox"]:checked {
background: rgb(77, 204, 191);
}
input[type="checkbox"]:checked:active:after {
box-shadow: 0 0.0625rem 0.1875rem 0.0625rem rgba(0,0,0,.4), 0 0 0 0.9375rem rgba(77, 204, 191,.3)!important;
}
input[type="checkbox"]:active:after {
box-shadow: 0 0.0625rem 0.1875rem 0.0625rem rgba(0,0,0,.4), 0 0 0 0.9375rem rgba(0, 0, 0,.3)!important;
}
var menu2 = [
["Browse", "/index.php",
[["Forums", "/forums"], ["Staff", "/staff"], ["Online Users", "/online"]]
],
["Activity", "/activity.php",
[["Test", "/test1"], ["Test2", "/test2"], ["Test3", "/test3"]]
],
];
for (var i = 0; i < menu2.length; i++) {
console.log(menu2[i][0] + " (" + menu2[i][1] + ")");
for (var e = 0; e < menu2[i][2].length; e++) {
console.log("- " + menu2[i][2][e][0] + " (" + menu2[i][2][e][1] + ")");
}
}
var exception = 0, message_error;
function setPatternFilter(id, pattern) {
setInputFilter(document.getElementById(id), function(value) { return pattern.test(value); });
}
function setInputFilter(textbox, inputFilter) {
["input", "keydown", "keyup", "mousedown", "mouseup", "select", "contextmenu", "drop"].forEach(function(event) {
textbox.addEventListener(event, function() {
if (inputFilter(this.value)) {
this.oldValue = this.value;
this.oldSelectionStart = this.selectionStart;
this.oldSelectionEnd = this.selectionEnd;
} else if (this.hasOwnProperty("oldValue")) {
this.value = this.oldValue;
this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
}
});
});
}
function validateInput(id, length, cname) {
var textbox = document.getElementById(id), name = id;
if (cname) {
name = cname;
}
if (textbox.value == "") { message_error += "El campo " + name + " no debe estar vacio.\n"; exception++; return; }
if (textbox.value.length < length) { message_error += "El campo " + name + " debe tener minimo " + length + " caracteres.\n"; exception++; return; }
}
setPatternFilter("patern", /^[a-z\s]*$/i);
setPatternFilter("materno", /^[a-z\s]*$/i);
setPatternFilter("nombre", /^[a-z\s]*$/i);
setPatternFilter("telefono", /^[0-9]*$/i);
setPatternFilter("dni", /^[0-9]*$/i);
function submit() {
exception = 0;
message_error = "";
validateInput("patern", 3, "Apellido Paterno");
validateInput("materno", 3, "Apellido Materno");
validateInput("nombre", 3, "Nombres");
validateInput("telefono", 9, "Telefono");
validateInput("dni", 8, "Dni");
if (exception > 0) {
document.getElementById("error").innerText = "Se encontraron " + exception + " errores.\n\n" + message_error;
} else {
document.getElementById("error") = "No se encontraron errores.";
}
};
|
|