pastebin
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
pastebin
Follow @pastebin
create new paste
trending pastes
sign up
login
my settings
my profile
My Pastes
Public Pastes
Untitled
3 sec ago
Untitled
6 sec ago
Untitled
6 sec ago
Untitled
10 sec ago
Untitled
12 sec ago
FR1D4Y N1GH7H 5M4CKD0WN...
18 sec ago
5x NETFLIX ACCOUNTS FRE...
1 min ago
Untitled
18 sec ago
Layout Width
Share Pastebin
VAB
By: a guest | Feb 9th, 2010 | Syntax:
HTML
| Size: 1.39 KB | Hits: 50 | Expires: Never
Download
|
Raw
|
Embed
|
Report abuse
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
xml:
lang
=
"pt-br"
lang
=
"pt-br"
>
<
head
>
<
title
>
<!-- Insert your title here -->
<
/
title
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=utf-8"
/
>
<!-- Chama jquery-->
<
script
type
=
"text/javascript"
src
=
"http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"
><
/
script
>
<
script
type
=
"text/javascript"
>
$(function(){
//ação ao clicar em alguma opção
$("input[name=opcao]").click(function(){
/**
* IRÁ ENVIAR VALORES PELO METODO POST
* Ele tem 3 parametros:
* primeiro - informa para que pagina será enviada: forma.php
* segundo - informa os valores que irão enviar
* tercerio - retorna o valor (callback) da consulta no forma.php
*/
$.post('forma.php',
{
opcao : $(this).val(),
total : $("total").val()
},
function(valor){
$("#formas").html(valor);
});
});
});
<
/
script
>
<
/
head
>
<
body
>
<!-- OPÇÃO DO FORMULÁRIO DO RADIO-->
<
form
action
=
""
method
=
"post"
>
Entrada :
<
input
type
=
"radio"
name
=
"opcao"
value
=
"entrada"
/
>
A vista :
<
input
type
=
"radio"
name
=
"opcao"
value
=
"vista"
/
>
<
input
name
=
"total"
id
=
"total"
type
=
"hidden"
value
=
"10000"
/
>
<
div
id
=
"formas"
><
/
div
>
<
/
form
>
<
/
body
>
<
/
html
>
create new paste
|
create new version of this paste
RAW Paste Data