Publicado por: pietrobr em: Maio 29, 2008
<?
class classe
{
public var $nome;
public var $idade;
public var $telefone;
public var $celular;
var $obs;
public function perfil()
{
$this->nome = $nome;
$this->idade = $idade;
$this->telefone = $telefone;
$this->celular = $celular;
$this->obs = $obs;
}
}
?>
Publicado por: pietrobr em: Maio 29, 2008
Source: jquery-latest
<html>
<head>
<script src=”jquery-latest.js“></script>
<script>
$(document).ready(function(){
$(document.body).click(function () {
if ($(“div:first”).is(“:hidden”)) {
$(“div”).show(“slow”);
} else {
$(“div”).slideUp();
}
});
});
</script>
<style>
div { background:#3d9a44; margin:3px; width:80px;
height:40px; float:left; }
</style>
</head>
<body>
Click me!
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
Publicado por: pietrobr em: Maio 28, 2008
<%
‘
‘ Arquivo Classe.asp
‘
Class classe
Private vSQL,vCon,vconString ‘variavel de conexao e de comandos SQL
Public vRS ‘variavel do recordset
Private Sub Conexao
Set vCon = CreateObject(“adodb.connection”) ‘criação do objeto que manipula o adodb
vconString = “Driver=Firebird/InterBase(r) driver;Uid=SYSDBA;Pwd=masterkey;DbName=D:\FIREBIRD\examples\TEST.FDB;” ‘String de conexão
vCon.execute(vconString) ‘execução no adodb
End Sub
Public Sub clientes
vSQL = “select * from clientes order by nome asc” ‘Comando SQL
Set vRS = vCon.execute(vSQL) ‘Record Set
End Sub
end class
%>
<%
‘
‘ Arquivo default.asp
‘
%>
<%@Language=”VBSCRIPT”%>
<html>
<head>
</head>
<body>
<!–#include file=”planilha.asp”–>
<%
objeto = new classe
while (not objeto.vRS.eof)
Response.Write(objeto.vRS(“nome”)&”<BR>”)
wend
%>
</body>
</html>
Publicado por: pietrobr em: Maio 28, 2008
Codigo:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Untitled Document</title>
<style>
#resultado{ border:1px solid #3366CC;}
</style>
<script type=”text/javascript”>
function propriedadesImagem(id)
{
var idDiv = document.getElementById(id);
var rsDiv = document.getElementById(‘resultado’);
foto = new Image();
foto.src = idDiv.src;
rsDiv.innerHTML = “Width: “+foto.width+” Height: “+foto.height+”Caminho da foto: “+foto.src;
}
</script>
</head>
<body>
<a href=”javascript:void(0)” onclick=”propriedadesImagem(‘foto’)”>Ver Informações</a><br />
<img id=”foto” src=”imagem.jpg” /><br />
<div id=”resultado”></div>
</body>
</html>