FONTE
FONTEChico Gois ha scritto:Description: Lets you add custom table.
Features:
- How many lines you want.
- How many columns you want
BBCode:HTML replacement:Codice: Seleziona tutto
[tabela]{TEXT}[/tabela]
Use:Codice: Seleziona tutto
<script language="Javascript"> var texto = '{TEXT}'; texto = texto.replace("\r\n",""); texto = texto.replace("<br>",""); texto = texto.replace(" ",""); var linha = new Array(); linha = texto.split('L='); var table = '<div align="center"><TABLE width=70% cellpadding=1 cellspacing=1 border=0>'; for (var i=1; i<linha.length; i++) { table = table + '<TR>'; var coluna = new Array(); coluna = linha[i].split('&'); for (var j=0; j<coluna.length; j++) { if (i == 1) { table = table + '<TD align=center style="background: #FF8904; font-size:11px; color:black; font-family: Verdana,Arial, Helvetica, sans-serif;"><b>' + coluna[j].replace("amp;","") + '</b></TD>'; } else { table = table + '<TD style="background: #878282; font-size:11px; color:white; font-family: Verdana,Arial, Helvetica, sans-serif;">' + coluna[j].replace("amp;","") + '</TD>'; } } table = table + '<TR>'; } table = table + '</TABLE></div>'; document.write(table); </script>
Obs.:Codice: Seleziona tutto
Separate the L rows and columns with = & [tabela] L=Nome&Nick&Sexo L=Tiago&Sapporo&Masculino L=Laura&Witch&Feminino L=Cesar&Rasec&Masculino [/tabela]
- The style can be changed completely.
- The first style is referred to the header and the second table with all the other lines.
Demo