0

だから私はここで紛らわしい問題を抱えています。HTML と JQuery Mobile でテーブルを作成しています。ただし、要素は重複し続け、コンテンツには UI CSS が適用されていません。明らかな何かが欠けているのでしょうか、それとも JQuery Mobile Library になじみのないものがありますか?

<table><tr><td><input type="radio"/></td><td>Less than $25,000</td></tr>
    <tr><td><input type="radio"></td><td>$25,000 - $49,999</td></tr>
    <tr><td><input type="radio"></td><td>$50,000 - $74,999</td></tr>
    <tr><td><input type="radio"></td><td>$75,000 - $100,000</td></tr>
    <tr><td><input type="radio"></td><td>More than $100,000</td></tr>
    <tr><td><input type="radio"></td><td>I am not required to share this information</td></tr>
</table></form>

これが、何が起こっているかのコードと画像です。

4

1 に答える 1

1

最初に次を発行します。

jQM が正しく表示されるようにするには、ラジオ オプションにこのマークアップが必要です。

HTML

<fieldset data-role="controlgroup" data-mini="true">
        <input type="radio" name="radio-mini" id="radio-mini-1" value="choice-1" checked="checked" />
        <label for="radio-mini-1">Credit</label>

    <input type="radio" name="radio-mini" id="radio-mini-2" value="choice-2"  />
        <label for="radio-mini-2">Debit</label>

        <input type="radio" name="radio-mini" id="radio-mini-3" value="choice-3"  />
        <label for="radio-mini-3">Cash</label>
</fieldset>

今(私は思う)あなたはテーブルタグを使って要素を画面にレイアウトしたり表示したりしています。タブ譜データに使用されるため、これを行わないことをお勧めします。これがあなたが探しているものだと思います:

HTML

<div data-role="page" class="type-home">

   <div data-role="content">
      <fieldset data-role="controlgroup">
    <legend>Annual Salary:</legend>
         <input type="radio" name="radio-choice" id="radio-choice-1" value="choice-1" checked="checked" />
         <label for="radio-choice-1">Less tahn $24,999</label>

         <input type="radio" name="radio-choice" id="radio-choice-2" value="choice-2"  />
         <label for="radio-choice-2">$25,000 - $49,999</label>

         <input type="radio" name="radio-choice" id="radio-choice-3" value="choice-3"  />
         <label for="radio-choice-3">$50,000 - $74,999</label>

         <input type="radio" name="radio-choice" id="radio-choice-4" value="choice-4"  />
         <label for="radio-choice-4">$75,000 - $99,999</label>

          <input type="radio" name="radio-choice" id="radio-choice-5" value="choice-5"  />
         <label for="radio-choice-5">More than $100,000</label>

          <input type="radio" name="radio-choice" id="radio-choice-6" value="choice-6"  />
         <label for="radio-choice-6">I am not required to share this information
</label>
</fieldset>
   </div>
</div>​

また、jQM ではテーブルは (まだ) 十分に文書化されていませんが、表示に必要な追加の属性がいくつかあることがわかります。

( Chrome で表示 )

  • ビューソース: http://jquerymobile.com/demos/1.2.0/docs/content/content-html.html

HTML:

<table summary="This table lists all the JetBlue flights.">
    <caption>Travel Itinerary</caption>
    <thead>
        <tr>
            <th scope="col">Flight:</th>
            <th scope="col">From:</th>
            <th scope="col">To:</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5">Total: 3 flights</td>
        </tr>
    </tfoot>
    <tbody>
        <tr>
            <th scope="row">JetBlue 983</th>
            <td>Boston (BOS)</td>
            <td>New York (JFK)</td>
        </tr>
        <tr>
            <th scope="row">JetBlue 354</th>
            <td>San Francisco (SFO)</td>
            <td>Los Angeles (LAX)</td>
        </tr>
        <tr>
            <th scope="row">JetBlue 465</th>
            <td>New York (JFK)</td>
            <td>Portland (PDX)</td>
        </tr>
    </tbody>
</table>

そうは言っても、テーブルに取り組んでいるいくつかの努力があります

于 2012-11-14T00:05:56.520 に答える