在jsp页面中java代码获取js里面var变量的值

在jsp页面中java代码获取js里面var变量的值,第1张

function deleteM(id){

//直接删掉 数据库假删除

/ alert(id);

$ /("#div"+id)remove();

$ajax({

url:"${pageContextrequestcontextPath}/servlet/MenuServletmethod=delete",

data:"id="+id,

success:function(data){

$("#div"+id)remove();

}

});

}

<body>

This is menu selectAll JSP page <br>

<jsp:include page="/servlet/MenuServletmethod=findAll"></jsp:include>

<p></p>

<div class="table-1">

<div class="tr-1">

<div class="td-1">序号</div>

<div class="td-1">标题</div>

<div class="td-1">连接地址</div>

<div class="td-1">排序</div>

<div class="td-1">录入时间</div>

<div class="td-1"> *** 作</div>

<div class="clear"></div>

</div>

</div>

<c:forEach items="${requestScopemenus }" var="a" varStatus="stat">

<div class="table-1">

<div class="tr-1" id="div${aid}">

<div class="td-1">${statcount }</div>

<div class="td-1">${atitle }</div>

<div class="td-1">${aurl}</div>

<div class="td-1">${asort }</div>

<div class="td-1" id="timer">${ainputTime }</div>

<div class="td-1">

<a href="javascript:void(0)" onclick="javascript:deleteM(${aid})" return false; id="deleteM${aid}">删除</a>

<a href="javascript:void(0)" onclick="javascript:updateM(${aid})" return false; id="updateM${aid}">修改</a>

<a style="display: none;" href="javascript:void(0)" onclick="javascript:submitM(${aid})" return false;id="okM${aid}">确定</a>

<a style="display: none;" href="javascript:void(0)" onclick="javascript:cancalM(${aid})" return false;id="cancalM{aid}">取消</a>

</div>

<div class="clear"></div>

</div>

</div>

</c:forEach>

<p></p>

<p></p>

<div id="table-1">

<c:forEach begin="1" end="${requestScopepagerpageCount }" var="i">

<c:if test="${i eq requestScopepagerpageNo }" var="isPageNo">

<span style="color:black">[${i }]</span>

</c:if>

<c:if test="${not isPageNo }">

<a href="${pageContextrequestcontextPath }/manage/menu/selectAlljsppageNo=${i}">[${i }]</a>

</c:if>

</c:forEach>

</div>

<p></p>

<p></p>

<div id="table-1">

<div class="tr-1">

<div class="td-2" ><a href="javascript:void(0)" onclick="javascript:insertM()">添加菜单项</a></div>

<div class="clear"></div>

</div>

</div>

<div id="table-1">

<div class="tr-1">

<div class="td-2" id=titleInsert>标题:<input required /></div>

<div class="td-2" id="urlsInsert">连接地址:<input required /></div>

<div class="td-2" id="sortInsert">排序:<input required onBlur="checkSort()"/></div>

<div class="td-2" ><a href="#" onclick="javascript:insertM();return false;">添加</a>

<a href="javascript:void(0)" onclick="javascript:cancalM2()">取消</a></div>

<div class="clear"></div>

</div>

</div>

<p></p>

<p></p>

<p></p>

<p></p>

<div id="table-1">

<div class="tr-1">

<div class="td-2" ><a href="javascript:void(0)" onclick="javascript:selectM()">我好想找点什么</a></div>

<div class="clear"></div>

</div>

</div>

<div id="table-1">

<div class="tr-1">

<div class="td-2" > <select id="sss" onChange="selectWay()">

<option value="s1"> 按录入时间查找:</option>

<option value="s2"> 按ID查找:</option>

<option value="s3">按排序查找:</option>

</select>

</div>

<div class="td-2" id="selectMByTime">

开始时间:<input type="datetime-local"/>结束时间:<input type="datetime-local"/>

<a href="javascript:void(0)" onclick="javascript:submitM(${ainputTime})">开找</a>

<a href="javascript:void(0)" onclick="javascript:cancalC(${ainputTime})">取消</a>

</div>

<div class="td-2" style="display: none;" id="selectMById">

ID:<input type="text" />

<a href="javascript:void(0)" onclick="javascript:submitM(${aid})">开找</a>

<a href="javascript:void(0)" onclick="javascript:cancalC(${aid})">取消</a>

</div>

<div class="td-2" style="display: none;" id="selectMBySort">

降序:<input type="radio" name="sort" id="up" checked />倒序:<input type="radio" name="sort" id="desc" />

<a href="javascript:void(0)" onclick="javascript:submitM(${asort})">开找</a>

<a href="javascript:void(0)" onclick="javascript:cancalC(${asort})">取消</a>

</div>

<div class="td-2" style="display: none;" ></div>

</div>

</div>

</body>

没有js的头`他说字数超限了

一段一段看:

(select from 1 order by id desc)    查询?1表中的数据,按照id倒排序

(select f,rownum rn from (select from 1 order by id desc) f where rownum<=2)    查询出的结果中取 小于  2  行的数据

select from (select f,rownum rn from (select from 1 order by id desc) f where rownum<=2) where rn>3     在小于    ?2行的数据中,取大于  3 行的数据。

也就是说, 获取  ?3  到  ?2  行的数据

以上就是关于在jsp页面中java代码获取js里面var变量的值全部的内容,包括:在jsp页面中java代码获取js里面var变量的值、分页查询中访问数据库的语句 求解释、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/9586599.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-29
下一篇 2023-04-29

发表评论

登录后才能评论

评论列表(0条)

保存