The examples I have seen all show a Facebox by clicking on an anchor. Is it possible to use a button instead? I am modifying an asp.net page that dynamically generates asp:button controls, and would like to not have to replace them with anchors. Thanks.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I was able to achieve this
jquery:
$('#save').click(function(){
$.facebox($('#save_name').html());
});
html:
<input id='save' type='button' class="facebox" value='Save Report' />
<div id="save_name" style="display:none" >
<label>Report Name: </label>
<input name="report_name" type="text" />
<input id="save_report" type="button" value="Save" />
</div>