HTML使用input上傳檔案時,若想要限制檔案的類型時可以使用accept屬性。
指定副檔名
指定副檔名必須為csv
<input type="file" name="file" accept=".csv">
指定副檔名必須為pdf
<input type="file" name="file" accept=".pdf">
指定副檔名為一個以上時,可以使用逗號分開
<input type="file" name="file" accept=".csv,.pdf">
指定為某種type
圖片類型:
<input type="file" name="file" accept="image/*">
HTML類型:
<input type="file" name="file" accept="text/html">
影片類型:
<input type="file" name="file" accept="video/*">
音訊類型
<input type="file" name="file" accept="audio/*">
RC4加密在密鑰的生成演算中存在漏洞在 Acunetix 弱點掃描中被列為中度風險,以Apache實作關閉RC4加密方式
Laravel 版本支援對照表
挑選適合的網站字型,可以為您的網站質感加分不少,到底應該如何挑選合適的字型呢?接下來介紹由免費中文字型--思源黑體。
使用daterangepicker UI介面選擇日期後,不會觸發input中的onchange事件
get view html in controller laravel?如何在Controller中取得View Blade的HTML字串呢?