我正在使用 jQuery Popup Overlay http://vast-eng.github.io/jquery-popup-overlay/作为模态表单。我想要实现的是根据单击哪个打开模式按钮来更改模式的标题。
我的 html 看起来像这样:
<a class="Modal_Open">Use this text as modal heading 1</a>
<a class="Modal_Open">Use this text as modal heading 2</a>
Modal:
<div id="Modal" display:none>
<p>Want to switch the text here</p>
<input type="text" />
</div>
我的jQuery
$(document).ready(function () {
$('#Modal').popup();
});
这是一个 .net 项目,所以如果解决方案在 C# 中更容易,请不要担心。