JavaScript 二维数组排序
var o = ['你', 'da', '你', 123, 'fm', 'fm', 'da', 123, 'fm', 123];
var n = [];
var s = -1;
var t = null;
o.sort();
for(var i = 0; i < o.length; i++)
{
if(o[i] != t)
{
s += 1;
n[s] = [];
}
n[s][n[s].length] = t = o[i];
}
for(var i = 0; i < n.length; i++)
{
alert(n[i]);
}
相关文档:
引用地址:http://bbs.syue.com/thread-36034-1-1.html
直接在ie地址栏输入命令,回车,执行js。
这样也可以用来改变和获取元素的值和属性,很实用的。
查看cookie
javascript:alert(document.cookie)
直接编辑cookie
javascript:document.cookie=window.prompt("Linx Edit cookie:",document.cookie);void( ......
1 Add the following code to .aspx
<script>
function fresh() {
{
window.opener.document.getElementById("ControlId").click(); //ControlId -- ......
很多人都向在服务器端调用客户端的函数来操作,也就是在asp中调用javascript脚本中已经定义好的脚本函数。经过研究,发现了一些勉强的方法。
1. 用Response.Write方法写入脚本
比如在你单击按钮后,先操作数据库,完了后显示已经完成,可以在最后想调用的地方写上
Response.Write("<script type='text/javascrip ......
insertAtCurson 函数代两参数分别为对象和输入的字符
function insertAtCursor(myField, myValue)
{
if (document.selection)
{
&nb ......