100 ·Ö jquery ajax Éú³É±í¸ñÎÊÌâ - Web ¿ª·¢ / Ajax
body Ò³Ãæ
HTML code:
<body>
<div class="container">
<s:iterator value="#session.listMenus">
<div class="menuTitle" menuId="<s:property value='menuId'/> " >
<s:property value="menuName" />
<input type="hidden" id="userId" value="<s:property value='#session.requestUserid'/>" >
</div>
</s:iterator>
<div class="menuContent" id="menu">
</div>
</div>
JS
HTML code:
<script type="text/javascript">
$(document).ready(
function()
{
var userId=$("#userId").val();
var ss;
$("input[id^='menuId']").click(function(){
ss=($(this).attr("id"));
});
$(".menuTitle").click(function(){
var mentId=($(this).attr("menuId"));
$.ajax({
type:"post",
url:"role/roleOper!findRolePermissAdd?userId="+userId+"&menuId="+mentId,
dataType:"xml",
suc
Ïà¹ØÎÊ´ð£º
ÎÒÏÖÔÚÓÃstruts2¿ò¼ÜÖÐÐèҪʹÓÃajaxʵÏÖ¾Ö²¿Ë¢Ð£¬µ«ÊÇ´ÓÈÝÆ÷Àï·µ»ØµÄÖµ²»ÖªµÀÔõô´Óstruts.xmlÅäÖÃÎļþÀïÓ³Éäµ½jspÒ³ÃæÀÒÔÇ°servletÀïдout.orint("xxxxx")¾Í¿ÉÒԵõ½~£¬µ«ÊÇÏÖÔÚÓÃstruts¾Í²»ÖªµÀÔõô ......
RT£¡
xmlHttpRequest.send("Ìá½»²ÎÊýÃû=Öµ&Ìá½»²ÎÊýÃû1=Öµ");
var date={"Êý¾Ý1":"Êý¾Ý1Öµ","Êý¾Ý2":"Êý¾Ý2Öµ","Êý¾Ý3":"Êý¾Ý3Öµ" ......
a.asp
------------------------------------------------<SCRIPT language=javascript src="check.js"></SCRIPT>
<input type="button" value="²âÊÔ" onclick=&quo ......
asp.net ajaxÓÐÒì²½ÉÏ´«¿Ø¼þÂð£¿ÈçºÎʹÓã¿
ÎÒÕâÀï¸ÕºÃÓÐÒ»¸ö, ÎÒ¸øÄãÏÂÔصØÖ·°É,
http://www.ttsuppliers.com/images/tempimage/QuickUpload.rar
Â¥Ö÷ÏÂÔؾÍÐÐÁË.
ÓÐûÓÐһЩ´ø½ø¶ÈÌõµÄ(¶àÎļþÉÏ´«£¬´ø½ø¶ÈÌõ ......
ÎÊÌâ: ÏÖÔÚÌá½»Ö®ºó¾Í²»ÄÜÌøµ½ajax.jsÖÐÖ¸¶¨µÄservlet
¶øÊÇÓÖÖØнøÈëµ½ÁËpub_hotel_t.jspÒ³Ãæ. Ò²¾ÍÊÇûÓÐÖ´Ðе½ajaxÀïÃæÈ¥ ´ó¼Ò°ïæ¿´¿´ÊÇʲôÔÒò°É.
ÊDz»ÊǺÍÌá½»µÄ°´Å¦ÓйØÄ ......