Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/jquery-mobile/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery mobile 使用jquerymobile弹出窗口_Jquery Mobile_Popup - Fatal编程技术网

Jquery mobile 使用jquerymobile弹出窗口

Jquery mobile 使用jquerymobile弹出窗口,jquery-mobile,popup,Jquery Mobile,Popup,你好,我想用Jquerymobile创建一个弹出窗口。 在我的应用程序中,我有一个问题和三个答案选项。如果用户单击一个答案,则会出现一个弹出窗口:对于正确的答案:这是正确的。对于错误的答案:这是错误的。 3答案选项,两个是错的,一个是对的 谁能帮帮我吗 <fieldset data-role="controlgroup"> <legend> Question? <

你好,我想用Jquerymobile创建一个弹出窗口。 在我的应用程序中,我有一个问题和三个答案选项。如果用户单击一个答案,则会出现一个弹出窗口:对于正确的答案:这是正确的。对于错误的答案:这是错误的。 3答案选项,两个是错的,一个是对的

谁能帮帮我吗

<fieldset data-role="controlgroup">
                <legend>
                    Question?
                </legend>
                <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" />
                <label for="radio-choice-1">Körpergewicht / (Körpergröße)2</label>

                <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2"  />
                <label for="radio-choice-2">(Körpergewicht) / Körpergröße 2</label>

                <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3"  />
                <label for="radio-choice-3">Körpergewicht / (Alter)2</label>

            </fieldset>
        <a href="#" id="popupbut" data-role="button" data-theme="b">prüfen</a>

问题?
Körpergewicht/(Körpergröe)2
(Körpergewicht)/Körpergröe 2
Körpergewicht/(Alter)2


$(文档).ready(函数(){
$(文档).delegate(“#popuput”,“click”,函数(){
警报($($(输入[name='radio-choice-1']:已选中”).val();
$('').simpledialog2({
模式:“空白”,
标题文字:“Falsch”,
海德克罗斯:是的,
空白内容:
这是错误的
})
});})

这应该可以解决您的问题

  $(document).ready(function () {
            $(document).delegate('#popupbut', 'click', function () {
                var content = '';
                var headerText = '';
                if ($("input[name='radio-choice-1']:checked").val() == 'choice-1') {
                    content = '<p><br /><br />Right!.</p>'
                    headerText = 'Right';
                } else {
                    content = '<p><br /><br />Wrong!.</p>'
                    headerText = 'Wrong';
                }
                $('<div>').simpledialog2({
                    mode: 'blank',
                    headerText: headerText,
                    headerClose: true,
                    blankContent: content

                });
            });
        }); 
$(文档).ready(函数(){
$(文档).delegate('#popuput',click',函数(){
var内容=“”;
var headerText=“”;
if($([输入[name='radio-choice-1']:选中”).val()=='choice-1'){
content='

对!

' headerText='右'; }否则{ content='

错误!

' headerText='错误'; } $('').simpledialog2({ 模式:“空白”, 标题文本:标题文本, 海德克罗斯:是的, 空白内容:内容 }); }); });
  $(document).ready(function () {
            $(document).delegate('#popupbut', 'click', function () {
                var content = '';
                var headerText = '';
                if ($("input[name='radio-choice-1']:checked").val() == 'choice-1') {
                    content = '<p><br /><br />Right!.</p>'
                    headerText = 'Right';
                } else {
                    content = '<p><br /><br />Wrong!.</p>'
                    headerText = 'Wrong';
                }
                $('<div>').simpledialog2({
                    mode: 'blank',
                    headerText: headerText,
                    headerClose: true,
                    blankContent: content

                });
            });
        });