摘要: 注意是style.textDecoration而不是style.text-decoration浏览器不识别js中的text-decoration说明:该代码尽在chrome,firefox环境下,测试运行正常;在IE6.0环境下下,测试无效果;在IE7+ 环境下,未测试;附上代码:<script type="text/javascript"><!--//alert("132")-->function changeColor(num){ document.getElementById("rowcolumn_"+n 阅读全文
posted @ 2011-05-16 15:50 ctou45 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 今天写代码中要保存ajax请求的数据,代码如下:var changedid = null;$.get('user/getdepartment','',function(data){changedid=data;},'json');alert(changedid);//null结果发现changedid没有保存data,javascript的作用域也没有错啊?通过请教别人知道了问题的原因:异步调用时序问题。于是换成$.ajax:var changedid = null;淘宝女装夏装新款$.ajax({ url: 'user/getdepar 阅读全文
posted @ 2011-05-16 15:48 ctou45 阅读(304) 评论(0) 推荐(0) 编辑