Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as HTML by cad ( 3 years ago )
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap demo</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
	<style>
		img{
			cursor: pointer;
		}
	</style>
	
	<script>
		function editar(ra, nome, curso){
		
			document.getElementById("ra").value = ra;
			document.getElementById("nome").value = nome;
			document.getElementById("curso").value = curso;			
			
		}
	</script>	
	
  </head>
  <body>
    
	<div class="container">
  <div class="row">
    <div class="col-2"></div>
    <div class="col">
      
		<form>
		  <div class="mb-3">
			<label for="ra" class="form-label">RA</label>
			<input type="text" class="form-control" id="ra" aria-describedby="emailHelp">			
		  </div>
		  <div class="mb-3">
			<label for="nome" class="form-label">NOME</label>
			<input type="text" class="form-control" id="nome" aria-describedby="emailHelp">			
		  </div>
		  <div class="mb-3">
			<label for="curso" class="form-label">CURSO</label>
			<input type="text" class="form-control" id="curso" aria-describedby="emailHelp">			
		  </div>
		  
		  <button type="button" class="btn btn-primary ">Salvar</button>
		  <button type="button" class="btn btn-primary ">Limpar</button>
		</form>
		
		<table class="table">
		  <thead>
			<tr>
			  <th scope="col">Editar</th>
			  <th scope="col">Excluir</th>
			  <th scope="col">RA</th>
			  <th scope="col">NOME</th>
			  <th scope="col">CURSO</th>
			</tr>
		  </thead>
		  <tbody>
			<tr>
			  <td><img src="editar.png" onClick="editar(1,'Ana','TADS')"></td>
			  
			  <td><img src="excluir.png"></td>
			  <td>1</td>
			  <td>Ana</td>
			  <td>TADS</td>
			</tr>
			<tr>			
			  <td><img src="editar.png" onClick="editar(2,'Pedro','Matemática')"></td>
			  
			  <td><img src="excluir.png"></td>
			  <td>2</td>
			  <td>Pedro</td>
			  <td>Matemática</td>
			</tr>
		  </tbody>
		</table>
	  
    </div>
    <div class="col-2"></div>
  </div>
</div>
	
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
  </body>
</html>

 

Revise this Paste

Your Name: Code Language: