userAngentは、ブラウザとオペレーティングシステムに関する詳細情報を取得するために使用されているブラウザとオペレーティングシステム
navigator.userAgent
についての情報を提供します。
我々は上記のコマンドを実行した場合の "Mozilla/5.0(Windows NTの10.0; Win64のx64の)のAppleWebKit/537.36(KHTML、ヤモリなど)クローム/ 59.0.3071.115サファリ/ 5xx.xx"はoutuputですbowsersコンソール。
例:
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
//Android
if(/android/i.test(userAgent))
{
//run the android specific code
//In your case hide the Input
}
//iOS
if(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream)
{
//run the iOS specific code
//In your case hide the Input
}
//Windows Phone
if (/windows phone/i.test(userAgent)) {
//run the Windows specific code
//In your case hide the Input
}
https://stackoverflow.com/questions/16819845/how-to-disable-take-photo-on-file-input-ios-6あなたの助けのため –