01.
<
html
>
02.
03.
<
meta
http-equiv
=
"x-ua-compatible"
content
=
"ie=edge"
>
04.
<
meta
charset
=
"utf-8"
>
05.
<
script
src
=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></
script
>
06.
<
link
rel
=
"stylesheet"
href
=
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css"
>
07.
08.
<
script
src
=
"mysql-8-access.js?002"
></
script
>
09.
10.
<
head
>
11.
<
script
>
12.
13.
var tableName = "社員マスタ";
14.
15.
$(function(){
16.
17.
var count = getFieldCount( tableName );
18.
var name = getFieldName( tableName );
19.
20.
console.dir(name);
21.
22.
for( var i = 0; i <
count
; i++ ) {
23.
24.
$("<span>")
25.
.appendTo( $("body") )
26.
.text(name[i])
27.
.css( {
28.
"display": "inline-block",
29.
"width": "120px"
30.
})
31.
;
32.
33.
$("<
input
>")
34.
.appendTo( $("body") )
35.
.css( {
36.
"background-color": "skyblue",
37.
"color": "white"
38.
})
39.
.prop( {
40.
"value": "",
41.
"id" : "fld" + (i+1)
42.
})
43.
;
44.
45.
$("<
br
>")
46.
.appendTo( $("body") )
47.
;
48.
49.
}
50.
51.
});
52.
53.
54.
</
script
>
55.
</
head
>
56.
<
body
>
57.
58.
<
input
type
=
"button"
id
=
"btn"
value
=
"参照"
style
=
"position:absolute;left:500px;top:0px;"
>
59.
60.
61.
62.
63.
</
body
>
64.
</
html
>