随笔分类 - JQuery
摘要:比如:deraction = "left";$("ul").animate({deraction : 200},400)然后我想通过js把deraction在不同的情况下变换成 left或者top来实现ul是向左移动还是向上移动,但这种方法总是不成功,还会报js的语法错误。所以可以将animate方法替换成成对象例如:function animateObj(f){ var data={}; if(f==="left"){data.left="100px";} if(f==="top"){data
阅读全文
摘要:function menu_show(play_type,elementID,firstTag,elementTag,lastTag,_time){ //play_type为触发事件方式,值可为click或者hover。 //elementID为此菜单的ID。 //firstTag此值为列表项每一项的标签名。 //elementTag为列表项每一项的标签名的下一级的标签名。 //lastTag二级菜单的标签名 //_time为展开二级菜单的时间 if(!$("#"+elementID)){return} for(var i=0;i<...
阅读全文
摘要:function nowTime(){//填写订单编号var year=new Date().getUTCFullYear().toString();var month=new Date().getMonth();var date=new Date().getDate();var hours=new Date().getHours();var minutes=new Date().getMinutes();var seconds=new Date().getSeconds();var milliseconds=new Date().getMilliseconds();if((month+1)&
阅读全文
摘要:function test(){$.ajax({ type: "POST", url: "json.txt", data: '000', dataType:'json',//此项十分重要,切记! success: function(msg){ var data_text=""; $.each(msg.logistics_companies_get_response.logistics_companies.logistics_company, function(i,item){ data_text+=&q
阅读全文
摘要:<body> <div></div> <div id="b"></div> <div></div> <div></div> <div></div> <div></div> </body><style>div{height:100px;width:100px;border:1px solid #ccc;margin-bottom:10px; background-color:white; curso
阅读全文
摘要:<body><button>Click Here</button><div>this is a div</div><p>this is a p</p><span>this is a span</span><br /><br /><b>this is a b</b><br /><br /><em>this is a em</em></body>$(function(){ $(&quo
阅读全文
浙公网安备 33010602011771号