Уфф...никто не обращает внимание на мою просьбу в просьбах о скриптах, хотя бы здесь помогите разделить по цвету на три и больше групп,лучше сразу пять...умм...хнык=хнык,я не хнычу,но у меня завтра праздник-хочется доделать и отдыхать...Этот скрипт не работает...
<script type="text/javascript">
var arr=document.getElementsByTagName("td")
var arr1=new Array (" Мася")
var arr2=new Array (" Океанка")
var arr3=new Array (" Ms President")
var arr4=new Array ("НИК","НИК")
var arr5=new Array ("НИК","НИК")
var arr6=new Array ("НИК","НИК")
var arr7=new Array ("НИК","НИК")
var x=0
var j=0
for (x in arr)
{while (x<=(arr.length -1))
{for (j in arr1)
{while (j<=(arr1.length-1))
{if (arr[x].innerHTML.indexOf(arr1[j])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr1[j]))+"<font color=' yellow'>"+arr1[j]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr1[j])+arr1[j].length)}
j=j+1}}
x=x+1}}
for (x in arr2)
{while (x<=(arr.length -1))
{for (i in arr2)
{while (i<=(arr2.length -1))
{if (arr[x].innerHTML.indexOf(arr2[i])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr2[i]))+"<font color=' teal'>"+arr2[i]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr2[i])+arr2[i].length)}
i=i+1}}
x=x+1}}
for (x in arr3)
{while (x<=(arr.length -1))
{for (j in arr3)
{while (j<=(arr1.length-1))
{if (arr[x].innerHTML.indexOf(arr3[j])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr3[j]))+"<font color=' blue'>"+arr3[j]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr3[j])+arr3[j].length)}
j=j+1}}
x=x+1}}
for (x in arr4)
{while (x<=(arr.length -1))
{for (j in arr4)
{while (j<=(arr4.length-1))
{if (arr[x].innerHTML.indexOf(arr1[j])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr4[j]))+"<font color='ЦВЕТ'>"+arr4[j]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr4[j])+arr4[j].length)}
j=j+1}}
x=x+1}}
for (x in arr5)
{while (x<=(arr.length -1))
{for (j in arr5)
{while (j<=(arr5.length-1))
{if (arr[x].innerHTML.indexOf(arr1[j])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr5[j]))+"<font color='ЦВЕТ'>"+arr5[j]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr5[j])+arr5[j].length)}
j=j+1}}
x=x+1}}
for (x in arr6)
{while (x<=(arr.length -1))
{for (j in arr6)
{while (j<=(arr1.length-1))
{if (arr[x].innerHTML.indexOf(arr6[j])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr6[j]))+"<font color='ЦВЕТ'>"+arr6[j]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr6[j])+arr6[j].length)}
j=j+1}}
x=x+1}}
for (x in arr7)
{while (x<=(arr.length -1))
{for (j in arr7)
{while (j<=(arr1.length-1))
{if (arr[x].innerHTML.indexOf(arr7[j])!= -1)
{arr[x].innerHTML=arr[x].innerHTML.substring (0, arr[x].innerHTML.indexOf(arr7[j]))+"<font color='ЦВЕТ'>"+arr7[j]+"</font>"+arr[x].innerHTML.substr (arr[x].innerHTML.indexOf(arr7[j])+arr7[j].length)}
j=j+1}}
x=x+1}}
</script>
Отредактировано Мася (Ср, 7 Мар 2007 20:59:21)