如何在jQuery对话框标题中显示俄语文本? 就我而言,它只显示了这一点 – ???????
有人知道为什么吗?
调用showAjaxDialog:
$('.ajaxDialog').click(function () { ShowAjaxDialog(true, 'Привет Мир', 330, 300, this.href); return false; });
AjaxDialog代码:
function ShowAjaxDialog(isModal, title, width, height, url) { // show a spinner or something via css var dialog = $('').appendTo('body'); // open the dialog dialog.dialog({ // add a close listener to prevent adding multiple divs to the document close: function (event, ui) { // remove div with all data and events dialog.remove(); }, width: width, height:height, modal: isModal, title: title }); // load remote content dialog.load( url, //{}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object function (responseText, textStatus, XMLHttpRequest) { // remove the loading class dialog.removeClass('ajaxDialogLoading'); } ); //prevent the browser to follow the link }
演示: http : //jsfiddle.net/mhLc5/
链接: http : //jqueryui.com/demos/dialog/
码:
var $Dialog_div; function fnOpenDialog() { $Dialog_div = $('Hello').prependTo('body'); $Dialog_div = $('#ThisDialog').dialog({ autoOpen: true, draggable: true, resizable: true, title: 'Dialog put russian text: Jquery скалы, скалы и StackOverflow', modal: true, stack: true, height: ($(window).height() * 0.95), width: ($(window).width() * 0.9), buttons: { 'OK': function() { $Dialog_div.dialog('close'); } } }); } $('#ClickMe').click(fnOpenDialog);
HTML:
Click here!
以上就是jQuery教程分享如何在jQuery对话框标题中显示俄语文本相关内容,想了解更多jQuery开发(异常处理)及jQuery教程关注计算机技术网(www.ctvol.com)!)。
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/jquerytutorial/561675.html