javascript
  • jquery
  • html
  • 2016-10-28 4 views 1 likes 
    1

    jqueryで値の入力タイプを取得したい場合は、入力ファイルにファイルを追加する場合は、値のある入力タイプを追加したいと思います。このようなコードを使用しますjqueryで値の入力ファイルを取得する方法

    この値= "bloob:localhost..bla BLA BLA" のように私のコード値の入力タイプと
    $('#show_input').append("<input type='file' value='" + URL.createObjectURL(event.target.files[i]) + "'>"); 
    
    <form action="myform.php" method="post" class="form-horizontal" enctype="multipart/form-data"> 
        <div id="show_input"></div> 
        <input type="file" id="upload_file" name="upload_file[]" onchange="preview_image();" multiple/> 
    </form> 
    

    どのようにこの問題を解決するには?

    +0

    </span>であり、あなたがevent.target'は、そのコンテキストにある '何を仮定していますか? – adeneo

    答えて

    0

    あなたは開口部のinputタグを閉じていないと終了タグではなく</input>

    $('#show_input').append("<input type='file' value='"+URL.createObjectURL(event.target.files[i])+"'> </input> "); 
    
    +0

    はそのタイプです。はい、その本当の終了タグ –

    関連する問題