###前提・実現したいこと
javascriptの.htmlで<%= image_tag()%>を実装したいのですが、なかなかうまくいきません。
結果は<%= image_tag()%>と表示(ブラウザ上)されてしまいます。
###該当のソースコード
JS
1 $(function() { 2$('#exampleModal').on('show.bs.modal', function (event) { 3 var button = $(event.relatedTarget) // Button that triggered the modal 4 var recipient = button.data('whatever') // Extract info from data-* attributes 5 // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). 6 // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. 7 var modal = $(this) 8 modal.find('.modal-title').text('New message to ' + recipient) 9 modal.find('.modal-body').html( "<%= image_tag(recipient)%>" ) 10})
###補足情報(言語/FW/ツール等のバージョンなど)
フレームワークにBootstrapを使っています。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/07 06:13
2017/06/08 18:18