一些js和JQuery的方法 取值填值: 页面跳转:

一些js和JQuery的方法
取值填值:
页面跳转:

js: get-- innerText, innerHTML, value;  set-- innerText=?, innerHTML=?, value=?;

JQuery: get-- text(); html(); val();  set-- text("?"); html("?"); val("?");  

.attr("属性名称","属性值");

$("[name='表单名']").submit();  提交表单,选择器可以使用其它,但是form必须有name属性;

页面跳转:

window.location.href="?";

window.parent.location.href="?";  在从框架中一部分跳转到全页面时候使用;

window.location.reload();   刷新页面,如有需要,提示是否提交数据;

location=location; (返回操作前)刷新;

window.history.back();  页面后退;

window.history.forward();  页面前进;

window.history.go(?);  页面跳转(? : 1--前进1次,2--前进两次,  -1,-2--后退,同理);