Jenis properti HTML DOM FileUpload
Definisi dan Penggunaan
FileUpload jenis objek properti mengembalikan jenis bentuk elemen.
Untuk FileUpload objek, properti mengembalikan "file".
tatabahasa
fileuploadObject.type
Dukungan Browser
Semua browser utama mendukung atribut Jenis
contoh
contoh
Menampilkan FileUpload Jenis bentuk objek elemen:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> Tutorial ini (w3big.com) </ title>
<Script>
Fungsi displayResult () {
var x = document.getElementById ( "fname") ketik .;
alert (x);
}
</ Script>
</ Kepala>
<Body>
<Form>
Pilih file untuk meng-upload:
<Input type = "file" id = "fname">
</ Form>
<Tombol type = "button" onclick = "displayResult ()"> jenis input Tampilan </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> Tutorial ini (w3big.com) </ title>
<Script>
Fungsi displayResult () {
var x = document.getElementById ( "fname") ketik .;
alert (x);
}
</ Script>
</ Kepala>
<Body>
<Form>
Pilih file untuk meng-upload:
<Input type = "file" id = "fname">
</ Form>
<Tombol type = "button" onclick = "displayResult ()"> jenis input Tampilan </ button>
</ Body>
</ Html>
Coba »
benda fileupload