File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6+ < meta http-equiv ="X-UA-Compatible " content ="ie=edge " />
7+ < title > Form Results</ title >
8+ < style >
9+ body {
10+ font-family : Arial, sans-serif;
11+ margin : 20px ;
12+ }
13+ .container {
14+ max-width : 600px ;
15+ margin : 0 auto;
16+ }
17+ .result-item {
18+ padding : 10px ;
19+ margin : 10px 0 ;
20+ border : 1px solid # ddd ;
21+ border-radius : 4px ;
22+ }
23+ </ style >
24+ </ head >
25+ < body >
26+ < div class ="container ">
27+ < h1 > Form Results</ h1 >
28+ < div id ="results "> </ div >
29+ </ div >
30+ < script >
31+ // Display form results from URL parameters
32+ const params = new URLSearchParams ( window . location . search ) ;
33+ const resultsDiv = document . getElementById ( 'results' ) ;
34+
35+ if ( params . size === 0 ) {
36+ resultsDiv . innerHTML = '<p>No form data submitted.</p>' ;
37+ } else {
38+ params . forEach ( ( value , key ) => {
39+ const item = document . createElement ( 'div' ) ;
40+ item . className = 'result-item' ;
41+ item . innerHTML = `<strong>${ key } :</strong> ${ value } ` ;
42+ resultsDiv . appendChild ( item ) ;
43+ } ) ;
44+ }
45+ </ script >
46+ </ body >
47+ </ html >
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ body {
3131 color : var (--ink );
3232 font : var (--font );
3333}
34+
35+ header {
36+ text-align : center;
37+ padding : calc (var (--space ) * 2 ) var (--space );
38+ }
39+
3440a {
3541 padding : var (--space );
3642 border : var (--line );
You can’t perform that action at this time.
0 commit comments