Сообщение от kichSman
|
без jQuery - никак
|
точно!
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
table,td{
border: #000080 1px solid
}
.red{
background: #FF6161
}
.green {
background: #66CC33
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function() {
var d = /^[a-z\u0430-\u044f\u0451\d]+([-._]?[a-z\u0430-\u044f\u0451\d])*$/i,
a = $("<table/>");
$.each("Рыцарь_Смерти|777neo_hell777|M.e.g.A|T-u-r-b-O|N_A_G_I_B_A_T_O_R_666|_Mamku_epal_|.ZVER.|-imba-|V_-olchara|T.-_voy--pa..pka".split("|"), function(e, b) {
var c = $("<tr/>");
$.each([b, d.test(b)], function(a) {
c.append($("<td/>", {
text: this,
"class": a ? 1 == this ? "green" : "red" : ""
}))
});
$(a).append(c)
});
$("body").append(a)
});
</script>
</head>
<body>
</body>
</html>