js 知识点
来源:互联网 发布:js正则表达式\< 编辑:程序博客网 时间:2024/05/31 19:55
1.关闭父窗口,且屏蔽 是否关闭 的提示框,参考http://www.w3school.com.cn/htmldom/dom_obj_window.asp
parent.window.open("",'_self',"");parent.window.close();
2.刷新父窗口:parent.window.opener.document.execCommand("refresh");
2.java里构造json数据时,要这样pw.print("{\"error\":\""+String.valueOf(map.get("error"))+"\"}");今天整惨了,为了这个格式即{"key":"value"}
输出设置防止乱码response.setContentType("text/json;charset=utf-8");
3.$('#select button')[0].style.textIndent=23+'px';jquery取得id=select标签内的button标签,再缩进button上的文字,实现隐藏;
js操作css直接obj.style.样式,如果有下划线直接去掉(如:text_indent换成textIndent)
4.自适应高度iframe,jquery代码,这个代码写在iframe所引用的页面里,contentFrame是父页面的iframe的id
$(function(){
var parentIframe = $(window.parent.document).find("#contentFrame");
var childHeight = $(document).height();
parentIframe.height(childHeight);
});
- JS 知识点
- js 知识点
- js知识点
- js知识点
- js知识点
- JS知识点
- JS知识点
- js知识点
- js知识点
- js 知识点
- js【知识点】
- js知识点
- js知识点
- JS知识点
- js知识点
- JS知识点
- js操作excel知识点
- JS小知识点
- Eclipse Helios 3.6.2 官网下载地址
- 玩的就是ROM,解锁BootLoader大势所趋!
- QT for hello world
- java加密算法
- NS3 的安装
- js 知识点
- How do I call a C++ function from C?
- 2011-7-22 问题
- linux下history(历史)命令用法详解
- 命名管道的创建与使用
- Solmyr 的小品文系列之九:次序问题
- 存储过程格式
- C语言中的位运算&结构体浅析 — <编程之美>1.2学习笔记
- ZOJ3121 POJ3488 Arne Saknussemm