› Foros › PC › Software libre
<html>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='funciones.js'></script>
<?php
/**
* @author
* @copyright 2011
*/
include("funciones.php");
if(!isset($_COOKIE["registro"])){
creaFormulario();
echo "<input type='button' id='boton' value='pulsar'>";//este boton es para probar
}
else{
print("Usuario registrado");
}
?>
</html>
<html>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='funciones.js'></script>
<?php
/**
* @author
* @copyright 2011
*/
function creaFormulario(){
echo"<form name='formulario' action='registro2.php' method='post'>";
echo"Nombre de usuario<br><input type='text' name='nombre' id='nombre' value='' size=25><br>";
echo"Contraseña<br><input type='password' name='pass' id='pass' value='' size=25><br>";
echo"<input type='submit'name='enviar' value='Enviar'>";
echo"</form>";
echo"<a href='registro3.php'>Registrarse</a>";
}
function creaFormRegistro(){
echo"<form name='formularioReg' action='registro1.php' method='post'>";
echo"Introduce un nombre de usuario<br><input type='text' name='nombre2' id='nombre2' value='' size=25><br>";
echo"Contraseña<br><input type='password' name='pass1' id='pass1' value='' size=25><br>";
echo"Vuelve a introducir tu contraseña<br><input type='password' name='pass2' id='pass2' value='' size=25><br>";
echo"<input type='submit' name='enviar2' value='Enviar'>";
echo"</form>";
echo"<a href='registro1.php'>Volver</a>";
}
?>
</html>
var x;
x=$(document);
x.ready(inicializarEventos);
function inicializarEventos()
{
var x;
x=$("boton");
x.click(presionTitulo1)
}
function presionTitulo1()
{
alert("#probando");
}