文章分类 -  JavaScript

摘要:请先看一下代码01 <script type="text/javascript"> $.ajax({ type:"get", url:'http://localhost:8080/mmxh-mgt-console/demandList.action?callback=?',//callback=? 实现跨域功能 dataType:"json", async:false, success:function(msg){ alert("1"); } }); alert("2" 阅读全文
posted @ 2013-05-06 17:26 丿暖。风? 阅读(302) 评论(0) 推荐(0)
摘要:js中字母和ASCII码的转换alert("a".charCodeAt()) //97字符转数字alert(String.fromCharCode(97)) //a数字转字符对字符串处理:1.去掉空格var txt=$.trim($("txt1").val());2.转为数字txtNum=Number($.trim(txt)) + 1;var thisEle = $("#para").css("font-size"); //获取字体大小var textFontSize = parseFloat(thisEle , 阅读全文
posted @ 2012-10-25 11:29 丿暖。风? 阅读(103) 评论(0) 推荐(0)