我有以下HTML代码:
<!-- Small button group -->
<div class="btn-group">
<button class="btn btn-danger btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Small button
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</div>
现在我想根据xml文件的解析在javascript上添加dropdown-items。但我完全不知道该怎么做。我已经尝试过如何在这里描述它的方式:https://www.w3schools.com/jsref/met_select_add.asp,但那不起作用。
答案 0 :(得分:0)
你是说这样的意思吗? https://www.w3schools.com/tags/tag_select.asp
[assembly: ExportRenderer(typeof(ContentPage), typeof(MyCustomPageRenderer))]