2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【kintone】 DOMで添付ファイル数を取得する

Posted at

【注意】

kintoneではDOM操作はお勧めできない。
→アップデートでクラス名などが更新される可能性あるため。
ただしkintone JavaScript API 内で添付ファイルを取得できないイベントがあるため仕方なく利用する場合もある。

添付ファイル数を取得する

PC版

PC
//<div class="plupload_file_name" title=""></div>

//countに添付ファイル数を入れる
var count = document.getElementsByClassName('plupload_file_name').length;

モバイル版

モバイル
//<div class="forms-file-preview-caption-name-gaia"></div>

//countに添付ファイル数を入れる
var count = document.getElementsByClassName('forms-file-preview-caption-name-gaia').length;

※参考にした質問
添付ファイルの無し判定

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?