最后!! 好吧我修复了除了在下拉值中显示php代码之外的所有问题。
如何在下拉值之间显示php代码?
function btn(container, btnElem) {
// Launch Dialog
bootbox.dialog({
message: '<div class="container-fluid">' +
'<div class="col-md-12">' +
'<form class="form-horizontal"> ' +
'<div class="form-group"> ' +
'<label for="sel1">Select list (select one):</label>'+
'<select class="form-control" name="sel1" value="" id="sel1">'+
'<option value="<?php include "test.php" ;?>"> Test</option>'+
'<option value="<?php include "test2.php"; ?>">Test2</option>'+
'</select>'+
'</form> </div> </div></div>',
title: "Please selec a value",
buttons:{
success: {
label: "Select a Value",
className: "btn-success",
// Main Callback: takes the youTube URL and finds the ID, then returns the embed code
callback: function(){
var html="",
$a = document.getElementById("sel1").value,
html= $a;
// Add Back to Gridmanger, and wrap in editable region
gm.addEditableAreaClick(container, btnElem, html);
}
}
}
});
}
答案 0 :(得分:0)
您的解决方案中有一个双逗号(&#34;)错过了Html。请在bootbox.dialog函数中找到它并使用此html
<option value="TEST-VALUE"> Test</option>
而不是
<option value=TEST-VALUE"> Test</option>