<div id="comment">
<p>Всем привет. Вот крутой сайт <a href="">site.ru</a> </p>
<p>Тут еще картинки на этом сайте <a href="">Вот</a></p>
</div>
var div = document.getElementById('comment');
var link = document.links;
if(div.getElementsByTagName("a")) {
for(var i = 0; i < link.length; i++ )
link[i].setAttribute("rel", "nofollow");
}
var radarChartData = {
labels: ['Кол-во баллов'],
datasets: [
{
label: "Кол-во баллов",
fillColor: "rgba(44, 44, 210, 0.28)",
strokeColor: "rgba(44, 44, 210, 1)",
pointColor: "rgba(44, 44, 210, 1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(44, 44, 210, 0.7)",
data: [2,2,2,2],
}
]
};
var i = 1;
radarChartData.datasets[0].data.length = 0;
radarChartData.datasets[0].data.unshift(i);
console.log(radarChartData.datasets[0].data)
<!DOCTYPE html>
<html>
<head>
<title>1</title>
</head>
<body onload="do_game()">
<script>
var target;
var guess_input_text;
var guess_input;
var finished = false;
var guesses = 0;
var colors=["Tomato", "Violet", "Snow","Salmon", "Purple", "Navy","OliveDrab", "Lime", "LightGray","HotPink", "Gold", "Gainsboro"];
var alphacolors = colors.sort();
function do_game(){
var random_number = Math.random() *(alphacolors.length-1);
var random_number_integer = Math.floor(random_number);
target = random_number_integer + 1;
while (!finished) {
guess_input = prompt("I am thinking of a color \n\n" +
"What is the color, huh? ");
guesses += 1;
finished = check_guess();
}
}
function check_guess() {
if (!alphacolors.indexOf(guess_input)) {
alert("Sorry, I don't recognize your color \n\n" +
"Please try again");
return false;
}
if (guess_input > target) {
alert("Sorry! Your guess is not correct. \n\n" + "But I can help you: \n" + "your color is alphabetically higher than mine \n\n" + "Please try again");
return false;
}
if (guess_input < target) {
alert("Sorry! Your guess is not correct. \n\n"+"But I can help you: \n"+"your color is alphabetically lower than mine \n\n"
+"Please try again");
return false;
}
alert("You got it! The color was " + target +
".\n\n It took you " + guesses +
" guesses to get the right color");
myBody = document.getElementsByTagName("body")[0];
myBody.style.background=target;
return true;
}
</script>
</body>
</html>
var Cards = {
card: ["6","7","8","9","10","B","Q","K","A"], //карты
suit: ["♥","♣","♠","♦"],//масти
val: [1,2,3,4,5,6,7,8,9]//ранг карты
}