1

我正在尝试运行 mobiscroll 演示,但它没有按预期工作。而不是视觉日期滚动,我只看到天数月和年的文本。这是我的代码的主要部分:

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<script src="lib/mobiscroll.custom-2.6.2.min.js" type="text/javascript"></script>
<link href="src/css/style.css" rel="stylesheet">
<script type="text/javascript">
    $(function(){
    $('#demo').mobiscroll().date({
    invalid: { daysOfWeek: [0, 6], daysOfMonth: ['5/1', '12/24', '12/25'] },
    theme: 'ios',
    display: 'inline',
    mode: 'scroller',
    dateOrder: 'mmD ddyy'
    });    
    });     
</script>

在这里我调用了演示 html 代码:

<div data-role="page" id="registerPage">
        <div data-role="header">
            <h1>XXXX</h1>
        </div>
        <div data-role="content">
        Please fill in the form <br>

            <div data-role="fieldcontain">
            <label for="username">Username: </label>
            <input type="text" id="username"><br>                
            <label for="password">Password: </label>
            <input type="text" id="password" name="password" value=""><br>
            <label for="re-password">Re-type Password: </label>
            <input type="text" id="re-password"><br>
            <label for="name">Name: </label>
            <input type="text" id="name"><br>
            <label for="surname">Surname: </label>
            <input type="text" id="surname"><br>

            <fieldset data-role="controlgroup" data-type="horizontal">
            <legend>Gender:</legend>
            <input type="radio" name="gender" id="male" value="on" checked="checked">
            <label for="male">Male</label>
            <input type="radio" name="gender" id="female" value="off">
            <label for="female">Female</label>
            </fieldset>             

            <input name="demo" id="demo" class="i-txt" />

            </div>                
            <div class="button">
            <button type="button">Submit</button>
            <button type="button">Back</button>
            </div>
        </div>
    </div>

在此先感谢您的帮助..

4

0 回答 0