¿Como puedo solucionarlo?[object HTMLInputElement]
Publicado por Thais (1 intervención) el 30/04/2021 06:59:57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>Practica:Formulario Biblioteca.</title>
<meta charset="utf-8">
<script type="text/javascript">
var juntar=document.getElementById('todos');
juntar.onclick=fun_unir;
function fun_unir(){
var autorcod=document.getElementById('Autorcod');
var nombre=document.getElementById('Nombre');
var librocod=document.getElementById('Librocod');
var titulo=document.getElementById('Titulo');
var sbn=document.getElementById('Sbn');
var editorial=document.getElementById('Editorial');
var no_page=document.getElementById('No_page');
todos = todos + "<h2>" + autorcod.value + "</h2>";
todos = todos + "<h2>" + nombre.value + "</h2>";
todos = todos + "<h2>" + librocod.value + "</h2>";
todos = todos + "<h2>" + titulo.value + "</h2>";
todos = todos + "<h2>" + sbn.value + "</h2>";
todos = todos + "<h2>" + editorial.value + "</h2>";
todos = todos + "<h2>" + no_page.value + "</h2>";
document.getElementById('juntar').innerHTML=todos;
}
</script>
</head>
<body>
<header>
<link rel="stylesheet" type="text/css" href="HojadeEstiloBiblioteca.css">
<h1>Biblioteca.</h1>
<nav></nav>
<aside></aside>
<section></section>
<h2>Autor.</h2>
<form>
<label for="autorcod" >Codigo Del Autor:</label>
<br>
<input type="text" name="Autorcod" id="Autorcod" placeholder="Captura el codigo del autor..." size="35" />
<p></p>
<label for="nombre">Nombre Del Autor:</label>
<br>
<input type="text" name="Nombre" id="Nombre" placeholder="Captura el nombre del autor..." size="50"/>
<p></p>
<h2 >Libro.</h2>
<label for="librocod" >Codigo Del Libro:</label>
<br>
<input type="text" name="Librocod" id="Librocod" placeholder="Captura el codigo del libro..." size="35" />
<p></p>
<label for="titulo">Titulo Del Libro:</label>
<br>
<input type="text" name="Titulo" id="Titulo" placeholder="Captura el titulo del libro..." size="50"/>
<p></p>
<label for="sbn" >SBN:</label>
<br>
<input type="text" name="Sbn" id="Sbn" placeholder="Captura el SBN del libro..." size="35" />
<p></p>
<label for="editorial">Editorial Del Autor:</label>
<br>
<input type="text" name="Editorial" id="Editorial" placeholder="Captura el nombre de la editorial..." size="35"/>
<p></p>
<label for="no_page" >No.Paginas Del Libro:</label>
<br>
<input type="number" name="No_page" id="No_page" placeholder="Captura el numero de paginas del libro..." size="10" min="0" />
<p></p>
<input type="button" name="todos"
id="todos" value="MOSTRAR." onclick="fun_unir();">
</form>
<div id="juntar">Datos Ingresados.</div>
</body>
Valora esta pregunta


0