The submenu cannot be expanded after, append () splicing jsp statements in $.ajax ({})

<!DOCTYPE html>
<html>
<head>
<title>SaaS</title>
<link href="style/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="style/font-awesome.css">
<link href="style/style.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>  
</head>
<body>
<div class="content">
    <div id="menu" class="sidebar">
        <div class="sidebar-dropdown"></div>
    </div>
</div>
<script>   
    $.ajax({
        url:"GetmenuServlet",
        type:"get",
        dataType:"text",
        success:function (data) {
            var html ="<ul id="nav">";
                html+="<li><a href="index.jsp" class="open"><i class="icon-home"></i> </a></li>";
                    html+="<c:if test="${username!=null}">";
                   html+="<li class="has_sub"><a href="-sharp"><i class="icon-home"></i>";
                html+="<span class="pull-right"><i class="icon-chevron-right"></i></span>";
                html+="</a>";
                html+="<ul>";
                html+="<li><a href="index.jsp"></a></li>";
                html+="<li><a href="index.jsp">2</a></li>";
                html+="</ul>";
                html+="</li>";
                html+="</c:if>";
                html+="</ul>";
            $("-sharpmenu").append(html);
        }
    });
</script> 
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/custom.js"></script>
</body>
</html>

among them, the two submenus under the application test menu cannot be expanded. Personally, I think the action in custom.js is not realized, but it can not be changed. Find out how to implement

.
Mar.01,2021

        var html ="<ul id='nav'>";
            html+="<li><a href='index.jsp' class='open'><i class='icon-home'></i> </a></li>";
            html+="<c:if test='${username!=null}'>";
            html+="<li class='has_sub'><a href='-sharp'><i class='icon-home'></i>";
            html+="<span class='pull-right'><i class='icon-chevron-right'></i></span>";
            html+="</a>";
            html+="<ul>";
            html+="<li><a href='index.jsp'></a></li>";
            html+="<li><a href='index.jsp'>dddd2</a></li>";
            html+="</ul>";
            html+="</li>";
            html+="</c:if>";
            html+="</ul>";
            html+="<script src='js/custom.js'><\/script>";
            $('-sharpmenu').append(html);
            
            <script src='js/custom.js'><\/script>html
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9f7e9-1a5c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9f7e9-1a5c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?