1 del >
„; $directory = “testimages/„; se (is_dir del && di file_exists ($directory) ($directory)){ $handle = opendir ($directory); mentre (($file = readdir ($handle))! == falso) { se (! is_dir ($file)){ $ext = substr ($file, -3); se (== “jpg„ di $ext || == “GIF„ di $ext || == “png„ di $ext) { $xml. = “„; $xml. = “„. $file. “„; $xml. = “image caption„; $xml. = “„; } } } } $xml. = “„; eco $xml; codice " libero " di >html/jquery del class= di
type= " testo/Javascript " " di Javascript " del language= del id= " testxml " del il class= >this di
funzione (testo) {se (testo del typeof! testo del && “dell'oggetto„ del ==! = posizione di segnale minimo) this.empty di ritorno () .append ((questo [0] && questo [0] .ownerDocument || documento) .createTextNode (testo)); la varietà macera = ""; jQuery.each (testo || ciò, funzione () {jQuery.each (this.childNodes, funzione () {se (this.nodeType! = 8) macera += this.nodeType! = 1? this.nodeValue: jQuery.fn.text ([questo]); }); }); rinviare macerano; } funzione (testo) {se (testo del typeof! testo del && “dell'oggetto„ del ==! = annullare) this.empty di ritorno () .append ((questo [0] && questo [0] .ownerDocument || documento) .createTextNode (testo)); class= > di
1:
nome di schedario di varietà = $ (questo) .find (“nome di schedario„) .text ();