上面圖片是bootstrap中popoer的js自定義的文檔說明,如果要在js中寫自己想要彈出的內(nèi)容,下面是我照文檔寫的,template那里用了es6插入大段html用的``這個符號應(yīng)該是可以的吧。$(function() { $('[data-toggle="popover"]').popover({ html: true, trigger: "click", placement: 'bottom', template: `<div class="popover" role="tooltip"> <div class ="arrow"></div> <h3 class ="popover-title">SELECT A DATE</h3> <div class ="popover-content"> <p>asdadqweqrqq</p> </div> </div>` });})html:<button type="button" class="btn btn-lg btn-danger" data-toggle="popover">點我彈出/隱藏彈出框</button>先說明,把template去掉加上title和content兩個屬性,能彈出內(nèi)容。但是我現(xiàn)在想插入大段的html元素,請問我上述代碼哪里出問題了?
bootstrap的popover.js自定義彈出內(nèi)容問題
qq_笑_17
2018-12-20 16:10:50