[Php-avanzado] descifrar esto???

unes pacio unespac en gmail.com
Vie Oct 10 16:10:41 ART 2008


hola a todos, estaba analizando un script (js) de google y me encontre con
esto

if (!/[&?]q=[^&]/.test(l.search)) {

queria saver si alguien tiene idea de que se trata, (yo no entiendo nada)


aca va todo completo


<form action="http://www.google.com.ar/cse" id="cse-search-box">
  <div>
    <input type="hidden" name="cx"
value="partner-pub-9387201819733413:k9iv7g-vpje" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Buscar" />
  </div>
</form>
<script type="text/javascript">
(function() {
var f = document.getElementById('cse-search-box');
if (!f) {
f = document.getElementById('searchbox_demo');
}
if (f && f.q) {
var q = f.q;
var n = navigator;
var l = location;
if (n.platform == 'Win32') {
q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;';
}
var b = function() {
if (q.value == '') {
q.style.background = '#FFFFFF
url(http:\x2F\x2Fwww.google.com\x2Fcoop\x2Fintl\x2Fen\x2Fimages\x2Fgoogle_custom_search_watermark.gif)
left no-repeat';
}
};
var f = function() {
q.style.background = '#ffffff';
};
q.onfocus = f;
q.onblur = b;
if (!/[&?]q=[^&]/.test(l.search)) {
b();
}
}
})();

</script>

saludos
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www3.fi.mdp.edu.ar/cgi-bin/mailman/private/php-avanzado/attachments/20081010/696d267d/attachment.htm 


Más información sobre la lista de distribución Php-avanzado