$("#btn_submit").click(function(){
alertify.prompt("Please enter note/remarks for this Form:", function (e, value) {
$("#alertify-ok").val('Submit Form'); //change button text
if (e) {
alertify.success("Form has been submitted");
} else {
alertify.error("Your form is not submitted");
}
});警报提示对话框HTML
<button id="alertify-ok" class="alertify-button alertify-button-ok" type="submit">
OK
</button>当用户单击submit按钮时,会出现提示。尝试使用下面的命令更改按钮文本,但不起作用
$("#alertify-ok").val('Submit Form'); //change button textFiddle-需要将默认的OK按钮文本更改为其他内容的位置
如何将按钮文本从默认的OK更改为Submit Form?
发布于 2015-06-29 20:24:10
<button>具有innerText属性,但没有value。使用.text()
$("#alertify-ok").text('Submit Form'); //change button text使用选项更改默认文本。
alertify.prompt('Please enter your comments', 'some value',
function(evt, value){ alertify.message('You entered: ' + value);}
).set('labels', {ok:'Submit', cancel:'Cancel'});发布于 2015-06-29 20:37:24
找到这个:alertify
alertify.prompt('Please enter your comments', 'some value',
function(evt, value){ alertify.message('You entered: ' + value);}
).set('labels', {ok:'Submit Form', cancel:'New Cancel'});https://stackoverflow.com/questions/31115559
复制相似问题