幾個常用的指令碼寫法

2021-09-05 19:46:58 字數 565 閱讀 5466

返回按鈕的寫法:(要求:如果是開啟新視窗,則關閉視窗,否則就返回前一頁或者指定頁)

opennewwindow("***.aspx");

opennewwindow("***.aspx",true);

//根據引數ismax來決是否開啟全屏視窗:ismax為true開啟全屏

function opennewwindow(strurl, ismax,isresize,widthpx,heightpx)

if (typeof(lengthpx) == "undefined")

if(typeof(isresize) == "undefined")

if(typeof(ismax) == "undefined")

var strfeatures ="width="+widthpx+",height="+heightpx+",resizable="+isresize+",scrollbars=1,status=1,center=1";

newwin=window.open(strurl,"",strfeatures)

if(ismax)

}else}

shell指令碼常用的幾個命令

1 grep grep命令 檔案過濾分割與合併 grep global search regular expression re and print out the line,全面搜尋正規表示式並把行列印出來 是一種強大的文字搜尋工具,它能使用正規表示式搜尋文字,並把匹配的行列印出來。選項 grep...

幾個bash shell指令碼

今天剛學習linux shell程式設計,隨便寫幾個短小的指令碼練練語法,寫了這個才發現,一些命令及引數還是要記住的 例1.這是乙個數 算1 2 3 4 5 bin bash let s 0 p 1 let 表示數 算 while test p le 5 do test命令用於檢查某個條件是否成立,...

linux中sh指令碼的寫法

先介紹遇到的問題 遇到shell問題 1將變數中的內容輸入到某個檔案 date8 20181111 錯誤方式,linux會認為date8是指令並且去執行,這時候會報20181111是不可識別的指令 date8 bg action date txt 正確方式 echo date8 bg action ...