在function中定义的变量在function外面不能访问,
在function定义的变量在function里面没有作用域
------------------------------------------------------------------------------------------------------------
document.getElementById("table1").deleteRow(0);//删除第一行
var tblOrder=document.getElementById("table1")//得到一个表对象
var newtr1 = tblOrder.insertRow();//添加一行
var newtd1 = newtr1.insertCell(); //添加列
newtd1.innerHTML='<input type="text" name="a"/> <input tyep="button" />';
var tbody = document.getElementById('tableContact1');
newTr2=tbody.insertRow();
th0=document.createElement('th');
th0.setAttribute("width","20%");
th0.innerHTML = '<th id="thPosition' width="20%"></th>';
newTr2.appendChild(th0);------------------------------------------------------------------------------------------------------------ $('#txtSlatype')[0].disabled='true';将指定ID的控件辉掉
------------------------------------------------------------------------------------------------------------
//模式窗口var ob1=window.showModalDialog(url,"","dialogWidth=1200px;dialogHeight=700px");//打开父窗口1 var bossObj=new Object();
bossObj.window=window;
bossObj.document=document;
window.showModalDialog(url,bossObj,"dialogWidth=1200px;dialogHeight=700px");//打开父窗口2var parentWindow= window.dialogArguments.window;//得到父窗口的window对象
var parentDocument= window.dialogArguments.document;//得到父窗口的document对象
parentDocument.getElementById("aaa");//得到父窗口的id为aaa的对象//窗口关闭后将对象返回到父窗口里
slasList = new Array();//要返回给页面的对象
rtnObj = new Object();
rtnObj.slasList = slasList;
window.returnValue=rtnObj;
window.close();------------------------------------------------------------------------------------------------------------<input type="checkBox" name="aa" haha="22" dd="dd"/>
//可以得到haha和dd这个对象的值------------------------------------------------------------------------------------------------------------
var array=new Array();//创建数组
var o=new Object();
o.name="panmeng";
o.age=20;
var o2=new Object();
o2.name="panmeng2";
o2.age=19; array.push(o);//添加对象
array.push(o2);//添加对象 array.splice(0,1);//删除对象(第一个参数:删除的索引,第二个参数:删除几个)
------------------------------------------------------------------------------------------------------------onclick="history.back(-1);"
------------------------------------------------------------------------------------------------------------<iframe name="test343" align="MIDDLE" width="1" height="1" > <a target="test343" />//将超链接的页面在iframe中打开
------------------------------------------------------------------------------------------------------------
var newWindow=newWin =window.open(urlpath,'','height=1,width=1,top=0,left=0');
newWindow.close();
打开一个页面并关闭
document.location.reload(); //页面刷新
------------------------------------------------------------------------------------------------------------
SELECT * FROM ucm_content
CONNECT BY PRIOR dirindex=contentindex
START WITH contentindex= '434'; oracle(递归查询)的sql语句//从子节点查询出到父节点的所有记录 (APP里的历史版本查看)
select * from ucm_content u left join
ucm_content u2 on (u.dirindex=u2.contentindex) inner join ucp_basic ua on(u.cpindex=ua.cpindex) connect by prior
u.dirindex=u.contentindex start with u.contentindex=438 --------------------------------------------------------------
在function定义的变量在function里面没有作用域
------------------------------------------------------------------------------------------------------------
document.getElementById("table1").deleteRow(0);//删除第一行
var tblOrder=document.getElementById("table1")//得到一个表对象
var newtr1 = tblOrder.insertRow();//添加一行
var newtd1 = newtr1.insertCell(); //添加列
newtd1.innerHTML='<input type="text" name="a"/> <input tyep="button" />';
var tbody = document.getElementById('tableContact1');
newTr2=tbody.insertRow();
th0=document.createElement('th');
th0.setAttribute("width","20%");
th0.innerHTML = '<th id="thPosition' width="20%"></th>';
newTr2.appendChild(th0);------------------------------------------------------------------------------------------------------------ $('#txtSlatype')[0].disabled='true';将指定ID的控件辉掉
------------------------------------------------------------------------------------------------------------
//模式窗口var ob1=window.showModalDialog(url,"","dialogWidth=1200px;dialogHeight=700px");//打开父窗口1 var bossObj=new Object();
bossObj.window=window;
bossObj.document=document;
window.showModalDialog(url,bossObj,"dialogWidth=1200px;dialogHeight=700px");//打开父窗口2var parentWindow= window.dialogArguments.window;//得到父窗口的window对象
var parentDocument= window.dialogArguments.document;//得到父窗口的document对象
parentDocument.getElementById("aaa");//得到父窗口的id为aaa的对象//窗口关闭后将对象返回到父窗口里
slasList = new Array();//要返回给页面的对象
rtnObj = new Object();
rtnObj.slasList = slasList;
window.returnValue=rtnObj;
window.close();------------------------------------------------------------------------------------------------------------<input type="checkBox" name="aa" haha="22" dd="dd"/>
//可以得到haha和dd这个对象的值------------------------------------------------------------------------------------------------------------
var array=new Array();//创建数组
var o=new Object();
o.name="panmeng";
o.age=20;
var o2=new Object();
o2.name="panmeng2";
o2.age=19; array.push(o);//添加对象
array.push(o2);//添加对象 array.splice(0,1);//删除对象(第一个参数:删除的索引,第二个参数:删除几个)
------------------------------------------------------------------------------------------------------------onclick="history.back(-1);"
------------------------------------------------------------------------------------------------------------<iframe name="test343" align="MIDDLE" width="1" height="1" > <a target="test343" />//将超链接的页面在iframe中打开
------------------------------------------------------------------------------------------------------------
var newWindow=newWin =window.open(urlpath,'','height=1,width=1,top=0,left=0');
newWindow.close();
打开一个页面并关闭
document.location.reload(); //页面刷新
------------------------------------------------------------------------------------------------------------
SELECT * FROM ucm_content
CONNECT BY PRIOR dirindex=contentindex
START WITH contentindex= '434'; oracle(递归查询)的sql语句//从子节点查询出到父节点的所有记录 (APP里的历史版本查看)
select * from ucm_content u left join
ucm_content u2 on (u.dirindex=u2.contentindex) inner join ucp_basic ua on(u.cpindex=ua.cpindex) connect by prior
u.dirindex=u.contentindex start with u.contentindex=438 --------------------------------------------------------------
解决方案 »
- ★★★ 边放视频,边显示文字【JAVASCRIPT】
- checkbox选中状态保留
- javascript问题 大家帮忙
- 想在后面页面得到前面页面的复选框是否被选中的信息,怎么做啊?本人新手,求助各位大侠
- extjs 都是谁在用
- jquery 级联tab 问题请教
- 页面刷新,滚动条的问题,100分
- 第n次求救,如何在打印时去掉header和footer(调用webbrowser)
- 在JavaScript中arguments代表什么意思?
- 一个图标始终保持在窗口的最下方的特效什么地方有下呢?谢谢!
- 使用过htmleditor的朋友,输入文字的时候,htmleditor自动为文本添加了<p></p>
- js高手来 ,差生随机字符串
看见楼主的插入行想起来了。。