Tiberius Latebra написал(а):вторых там стоит pos+3 вместо pos+7
да я уже от 1 до 20 ставила, ничего так и не происходит.
Во-первых, он в виде комментария, потому что вне тэгов скрипта
Ну как давали так и ставила, а так не понимаю чем он отличается от других.ну кроме pos+7
Вот так стоит у меня.
Что именно криво???
Код
<script>
<!--
indexof="<img src='http://s1.uploads.ru/27F30.png' />"
str = document.getElementById("navindex").innerHTML
pos = str.indexOf("Форум")
document.getElementById("navindex").innerHTML=str.substring(0,pos)+indexof+str.substring(pos+5,str.length-1)
-->
</script>
<script>
<!--
userof="<img src='http://s1.uploads.ru/VNQzm.png' />"
str = document.getElementById("navuserlist").innerHTML
if( (pos=str.indexOf("Участники")) != -1 )
document.getElementById("navuserlist").innerHTML=str.substring(0,pos)+userof+str.substring(pos+9,str.length-1)
-->
</script>
<script>
<!--
findof="<img src='http://s1.uploads.ru/LG8fB.png' />"
str = document.getElementById("navsearch").innerHTML
pos = str.indexOf("Поиск")
document.getElementById("navsearch").innerHTML=str.substring(0,pos)+findof+str.substring(pos+5,str.length-1)
-->
</script>
<script>
<!--
faseof="<img src='http://s1.uploads.ru/eJjd7.png' />"
str = document.getElementById("navprofile").innerHTML
pos = str.indexOf("Профиль")
document.getElementById("navprofile").innerHTML=str.substring(0,pos)+faseof+str.substring(pos+14,str.length-1)
-->
</script>
<script>
<!--
pismaof="<img src='http://s1.uploads.ru/304qR.png' />"
str = document.getElementById("navpm").innerHTML
pos = str.indexOf("Сообщения")
document.getElementById("navpm").innerHTML=str.substring(0,pos)+pismaof+str.substring(pos+9,str.length-1)
-->
</script>
<!--
indexof="<img src='http://s1.uploads.ru/t2LlE.png' />"
str = document.getElementById("navindex").innerHTML
pos = str.indexOf("Награды")
document.getElementById("navindex").innerHTML=str.substring(0,pos)+indexof+str.substring(pos+7,str.length-1)
-->
</script>
<script>
<!--
godof="<img src='http://s1.uploads.ru/G4NPk.png' />"
str = document.getElementById("navadmin").innerHTML
pos = str.indexOf("Администрирование")
document.getElementById("navadmin").innerHTML=str.substring(0,pos)+godof+str.substring(pos+17,str.length-1)
-->
</script>
<script>
<!--
valiof="<img src='http://s1.uploads.ru/Hd2ZC.png' />"
str = document.getElementById("navlogout").innerHTML
pos = str.indexOf("Выход")
document.getElementById("navlogout").innerHTML=str.substring(0,pos)+valiof+str.substring(pos+5,str.length-1)
-->
</script>
<script>
<!--
vxodiof="<img src='http://s1.uploads.ru/GN1ni.png' />"
str = document.getElementById("navlogin").innerHTML
pos = str.indexOf("Войти")
document.getElementById("navlogin").innerHTML=str.substring(0,pos)+vxodiof+str.substring(pos+5,str.length-1)
-->
</script>
<script>
<!--
regof="<img src='http://s1.uploads.ru/GtzFQ.png' />"
str = document.getElementById("navregister").innerHTML
pos = str.indexOf("Регистрация")
document.getElementById("navregister").innerHTML=str.substring(0,pos)+regof+str.substring(pos+18,str.length-1)
-->
</script>
<!--
regof="<img src='http://s1.uploads.ru/LwuBa.png' />"
str = document.getElementById("navregister").innerHTML
pos = str.indexOf("Пиар")
document.getElementById("navregister").innerHTML=str.substring(0,pos)+regof+str.substring(pos+18,str.length-1)
-->
</script>
Отредактировано Nocticula de Michi (11.10.2012 17:09:27)