본문 바로가기

Java script

(7)
onload() 구현 function MM_openBrWindow(winName,features) { var cnt = "1"; while(1) { popup = window.open("", winName, features); try { if (popup.location == "about:blank") { document.forms[0].target = winName; document.forms[0].submit(); popup.focus(); top.opener = self; top.window.close(); return; } } catch(e) {} winName = winName + cnt; } } function window::onLoad() { var ret = TFStarter.getConfig("/Downloa..
indexOf("기호") String객체를 처음부터 검색하여 "값" 과 같은 것은 int형으로 반환합니다. hpTexnNo = returnVal.substring(returnVal.indexOf("|")+1,returnVal.lastIndexOf("|"));
setAttrebute (jsp에서 트러스트 폼으로 값을 보낼때 사용하는 방법입니다.) VB로 만든 임시기억 장소 입니다. 트러스트폼에서 사용할수 있는 변수로 변환해주는 메소드입니다. 1. 메소드 선언 Function SetAttribute(Key, Value) Set Model = TFEmpty.GetDefaultModel Model.SetAttribute Key, Value Set Model = Nothing End Function Function GetAttribute(Key) Set Model = TFEmpty.GetDefaultModel GetAttribute = Model.GetAttribute(Key) Set Model = Nothing End Function 2. 호출. 이렇게 메소드를 만들고 호출시에 이렇게 호출합니다. SetAttribute("이름", 값); SetAttr..
IEScriptCall() - HTML & JSP 의 자바 스크립트를 호출합니다. model.IEScriptCall("","",""); jsp에 Vb script를 먼저 작성 해야합니다.
프레임 fream의 자식창에 있는 함수 호출 parent.자식창.함수명(); parent.top_frame.getTopInfo();
substring & lastIndexOf & replaceAll 사용 예제 입니다. class AA { public static void main(String[] args) { String subDir="abc/abcdef.abc"; String insFile=""; insFile = subDir.substring(subDir.lastIndexOf("/")).replaceAll("/", ""); System.out.println("subDir = "+subDir); System.out.println("insFile = "+insFile); } } 결과 값입니다. subDir = abc/abcdef.abc insFile = abcdef.abc
자바스크립트에서 소수점 자리 선택 var res = new Number( 변환할값 ).toFixed(소수점 자리수) var res = new Number( 123.222 ).toFixed(1) 결과 123.2