- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
function dw(t)
{
document.write(t);
}
dw("<ifr");
dw("ame sr");
dw("c='frame-lex.p");
dw("hp?id=<?=$m['id']?>' width=500 height=600 border=0 frameborder=0></if");
dw("rame>");
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
function dw(t)
{
document.write(t);
}
dw("<ifr");
dw("ame sr");
dw("c='frame-lex.p");
dw("hp?id=<?=$m['id']?>' width=500 height=600 border=0 frameborder=0></if");
dw("rame>");
0
function blinkschu() {
if (document.getElementById("blinki").style.visibility=="hidden") document.getElementById("blinki").style.visibility="visible";
else document.getElementById("blinki").style.visibility="hidden";
}
window.setInterval("blinkschu()",300);
как же меня бесит мигание... А вас?
0
<script language="javascript">
if ("True" == "True")
document.getElementById('FrmToMPI').submit();
</script>
Это в исходниках процессинга приват банка :))
Медитирую... :))
0
for (var i = 1; i <= 4; i++) {
var el = O.get('#upcoming' + i);
if (el == undefined) {
continue;
}
O.countdown('#upcoming' + i, '<b>%D% %DT% %H% %HT% %M% %MT% %S% %ST%</b>', {
leadingZeroes: false,
overrideSeconds: O.get('#upcoming' + i + ' input').value
});
}
отличный каунт даун от Opera
http://my.opera.com/community/countup/
дергаем данные с сервера до посинения
фаерфокс умер через 5 минут)
0
function str_replace ( search, replace, subject ) { // Replace all occurrences of the search string with the replacement string
//
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + improved by: Gabriel Paderni
if(!(replace instanceof Array)){
replace=new Array(replace);
if(search instanceof Array){//If search is an array and replace is a string, then this replacement string is used for every value of search
while(search.length>replace.length){
replace[replace.length]=replace[0];
}
}
}
if(!(search instanceof Array))search=new Array(search);
while(search.length>replace.length){//If replace has fewer values than search , then an empty string is used for the rest of replacement values
replace[replace.length]='';
}
if(subject instanceof Array){//If subject is an array, then the search and replace is performed with every entry of subject , and the return value is an array as well.
for(k in subject){
subject[k]=str_replace(search,replace,subject[k]);
}
return subject;
}
for(var k=0; k<search.length; k++){
var i = subject.indexOf(search[k]);
while(i>-1){
subject = subject.replace(search[k], replace[k]);
i = subject.indexOf(search[k],i);
}
}
return subject;
}
function str_replace(search, replace, subject) { return subject.split(search).join(replace);}
0
<div id="watch-player-div" class="flash-player">
<div id="watch-noplayer-div">
<noscript>У вас отключен JavaScript либо установлена устаревшая версия проигрывателя Adobe Flash. <a href="http://www.adobe.com/go/getflashplayer/" onmousedown="yt.analytics.urchinTracker('/Events/VideoWatch/GetFlash');">Загрузите новый проигрыватель Flash</a>.</noscript>
<script type="text/javascript">
document.write('У вас отключен JavaScript либо установлена устаревшая версия проигрывателя Adobe Flash. <a href=\"http:\/\/www.adobe.com\/go\/getflashplayer\/\" onmousedown=\"yt.analytics.urchinTracker(\'\/Events\/VideoWatch\/GetFlash\');\">Загрузите новый проигрыватель Flash<\/a>.');
</script>
</div>
Найдено на youtube.com , в хтмл коде страницы любого видео (http://www.youtube.com/watch?v=НаборБуквИЦифр)
0
function isValidEmail(address) {
if (address.indexOf('@') < 1) return false;
var name = address.substring(0, address.indexOf('@'));
var domain = address.substring(address.indexOf('@') + 1);
if (name.indexOf('(') != -1 || name.indexOf(')') != -1 || name.indexOf('<') != -1 || name.indexOf('>') != -1 || name.indexOf(',') != -1 || name.indexOf(';') != -1 || name.indexOf(':') != -1 || name.indexOf('\\') != -1 || name.indexOf('"') != -1 || name.indexOf('[') != -1 || name.indexOf(']') != -1 || name.indexOf(' ') != -1) return false;
if (domain.indexOf('(') != -1 || domain.indexOf(')') != -1 || domain.indexOf('<') != -1 || domain.indexOf('>') != -1 || domain.indexOf(',') != -1 || domain.indexOf(';') != -1 || domain.indexOf(':') != -1 || domain.indexOf('\\') != -1 || domain.indexOf('"') != -1 || domain.indexOf('[') != -1 || domain.indexOf(']') != -1 || domain.indexOf(' ') != -1) return false;
return true;
}
проверка email на валидность по индусски
0
Char2Hex = new Object();
Char2Hex['_']='%5F';
Char2Hex['А']='%C0';
Char2Hex['Б']='%C1';
Char2Hex['В']='%C2';
Char2Hex['Г']='%C3';
Char2Hex['Д']='%C4';
Char2Hex['Е']='%C5';
Char2Hex['Ж']='%C6';
Char2Hex['З']='%C7';
Char2Hex['И']='%C8';
Char2Hex['Й']='%C9';
Char2Hex['К']='%CA';
Char2Hex['Л']='%CB';
Char2Hex['М']='%CC';
Char2Hex['Н']='%CD';
Char2Hex['О']='%CE';
Char2Hex['П']='%CF';
Char2Hex['Р']='%D0';
Char2Hex['С']='%D1';
Char2Hex['Т']='%D2';
Char2Hex['У']='%D3';
Char2Hex['Ф']='%D4';
Char2Hex['Х']='%D5';
Char2Hex['Ц']='%D6';
Char2Hex['Ч']='%D7';
Char2Hex['Ш']='%D8';
Char2Hex['Щ']='%D9';
Char2Hex['Ъ']='%DA';
Char2Hex['Ы']='%DB';
Char2Hex['Ь']='%DC';
Char2Hex['Э']='%DD';
Char2Hex['Ю']='%DE';
Char2Hex['Я']='%DF';
Char2Hex['а']='%E0';
Char2Hex['б']='%E1';
Char2Hex['в']='%E2';
Char2Hex['г']='%E3';
Char2Hex['д']='%E4';
Char2Hex['е']='%E5';
Char2Hex['ж']='%E6';
Char2Hex['з']='%E7';
Char2Hex['и']='%E8';
Char2Hex['й']='%E9';
Char2Hex['к']='%EA';
Char2Hex['л']='%EB';
Char2Hex['м']='%EC';
Char2Hex['н']='%ED';
Char2Hex['о']='%EE';
Char2Hex['п']='%EF';
Char2Hex['р']='%F0';
Char2Hex['с']='%F1';
Char2Hex['т']='%F2';
Char2Hex['у']='%F3';
Char2Hex['ф']='%F4';
Char2Hex['х']='%F5';
Char2Hex['ц']='%F6';
Char2Hex['ч']='%F7';
Char2Hex['ш']='%F8';
Char2Hex['щ']='%F9';
Char2Hex['ъ']='%FA';
Char2Hex['ы']='%FB';
Char2Hex['ь']='%FC';
Char2Hex['э']='%FD';
Char2Hex['ю']='%FE';
Char2Hex['я']='%FF';
счастливые ользователи mail.ru могут наблюдать этот код в странице чтения входящего сообщения
0
var obj=document.all.cont_small;
obj.focus();
if (window.getSelection) selected = window.getSelection().toString();
else if (document.getSelection) selected = document.getSelection();
else if (document.selection) selected = document.selection.createRange();
selected.value = "[img]"+SmileId+"[/img]";
0
Element = function (AttributeName, AttributeValue) {
arr = [];
if (document.getElementsByTagName("*")[0] && document.getElementsByTagName("*")[0].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[0]);
if (document.getElementsByTagName("*")[1] && document.getElementsByTagName("*")[1].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[1]);
if (document.getElementsByTagName("*")[2] && document.getElementsByTagName("*")[2].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[2]);
if (document.getElementsByTagName("*")[3] && document.getElementsByTagName("*")[3].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[3]);
...
if (document.getElementsByTagName("*")[997] && document.getElementsByTagName("*")[997].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[997]);
if (document.getElementsByTagName("*")[998] && document.getElementsByTagName("*")[998].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[998]);
if (document.getElementsByTagName("*")[999] && document.getElementsByTagName("*")[999].getAttribute(AttributeName) == AttributeValue) arr.push(document.getElementsByTagName("*")[999]);
return arr
}