为什么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"> </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"> [添加大分类信息] </a> </td> </tr> <tr> <td align="right"> </td> <td height="10" colspan="3"> </td> <td> </td> </tr> <tr> <td height="29" align="right"> </td> <td width="10" background="{{url_for('static',filename='admin/images/manage_leftTitle_left.GIF')}}"> </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')}}"> </td> <td> </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()"> <input name="Submit2" type="reset" class="btn_bg_short" value="重置"> <input name="Submit3" type="button" class="btn_bg_short" value="返回" onClick="JScript:window.location.href='subType.html';"> </td> </tr> </table> </form> <div> {% endblock %}
帮忙看一下,如何解决