已有184人关注
为什么HTML页面在pycharm中报错
发表在Python图书答疑 2021-04-20 《Python项目开发案例集锦》第17章 51商城
是否精华
版块置顶:
html界面中{% endblock %}报错,显示Element div is not closed:元素表未关闭

举例:subcat_add.html
{% extends "admin/common.html" %}
{% block content %}
<script language="javascript">
function mycheck(){
   if (form1.cat_name.value==""){
      alert("请输入小分类名称!");form1.cat_name.focus();return;
   }
   form1.submit();
}
</script>
<table width="1280" height="288"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="10" height="38" align="right">&nbsp;</td>
        <td colspan="3" class="tableBorder_B_dashed">
            <a href="{{url_for('admin.supercat_add')}}">
            <img src="{{url_for('static',filename='admin/images/manage_ico1.GIF')}}" width="11" height="13">&nbsp;[添加大分类信息]
            </a>
        </td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td height="10" colspan="3">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="29" align="right">&nbsp;</td>
        <td width="10" background="{{url_for('static',filename='admin/images/manage_leftTitle_left.GIF')}}">&nbsp;</td>
        <td width="1089" align="center" background="{{url_for('static',filename='admin/images/manage_leftTitle_mid.gif')}}" class="word_white">
            <b>添加小分类信息</b>
        </td>
        <td width="10" background="{{url_for('static',filename='admin/images/manage_leftTitle_right.gif')}}">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
</table>
      <form action="{{url_for('admin.subcat_add')}}" method="post" name="form1">
             <table width="94%"  border="0" align="right" cellpadding="-2" cellspacing="-2" bordercolordark="#FFFFFF">
                  <tr>
                    <td height="50">选择所属分类:</td>
               <td height="50">
                        <select name="super_cat_id">
                            {% for item in supercat %}
                                <option value="{{item.id}}">{{item.cat_name}}</option>
                            {% endfor %}
                   </select>
                    </td>
                  </tr>
              <tr>
                    <td width="17%" height="50">小分类名称:</td>
                    <td height="50">
                        <input name="cat_name" type="text" id="cat_name" size="60">
                    </td>
                  </tr>
                  <tr align="center">
                    <td height="38" colspan="3">
                        <input name="Button" type="button" class="btn_bg_short" value="保存" onClick="mycheck()">
                        &nbsp;
                        <input name="Submit2" type="reset" class="btn_bg_short" value="重置">
                        &nbsp;
                        <input name="Submit3" type="button" class="btn_bg_short" value="返回" onClick="JScript:window.location.href='subType.html';">
                    </td>
                  </tr>
                </table>
           </form>
      <div>
{% endblock %}

帮忙看一下,如何解决

分享到:
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照