zoukankan      html  css  js  c++  java
  • 在th中显示图片

    从DataTable中获取值:

      foreach (DataRow dr in ((DataTable)ViewBag.bookInfoList).Rows)
                {
    
            <tr>
    <th class="showImg" value="@dr["example"]"></th>
                <th class="showImg">"@dr["answer"]"</th>
                <th  class="showImg" value="@dr["analysis"]"></th>
                <th>@dr["keypoint"]</th>
                <th>@dr["keypointTitle"]</th>
                <th  class="showImg" value="@dr["keypointContent"]"></th>
                <th  class="showImg" value="@dr["examples"]"></th>
    }
    

     循环显示:

     $(function () {
            $('.showImg').each(function (item, index) {
                console.log($(this));
                console.log(index);
                $('.showImg').eq(item).html($('.showImg').eq(item).attr('value'));
            })
        });
    
  • 相关阅读:
    12.1
    11.26
    12.5Java日报
    11.25
    11.27
    12.03
    11.28
    12.04
    如何在TortoiseGit中使用sshkeygen生成的key
    leetcode 39 组合总和
  • 原文地址:https://www.cnblogs.com/sunliyuan/p/8891426.html
Copyright © 2011-2022 走看看