showModalDialog Method (IE 전용)
showModalDialog Method
Creates a modal dialog box that displays the specified HTML document.
Syntax
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
Parameters
sURL Required. Stringthat specifies the URL of the document to load and display. vArguments Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of the window object. sFeatures Optional. Stringthat specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values:
dialogHeight:sHeight Sets the height of the dialog window (see Remarks for default unit of measure). dialogLeft:sXPos Sets the left position of the dialog window relative to the upper-left corner of the desktop. dialogTop:sYPos Sets the top position of the dialog window relative to the upper-left corner of the desktop. dialogWidth:sWidth Sets the width of the dialog window (see Remarks for default unit of measure). center:{ yes | no | 1 | 0 | on | off } Specifies whether to center the dialog window within the desktop. The default is yes. dialogHide:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window is hidden when printing or using print preview. This feature is only available when a dialog box is opened from a trusted application. The default is no. edge:{ sunken | raised } Specifies the edge style of the dialog window. The default is raised. resizable:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window has fixed dimensions. The default is no. scroll:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays scrollbars. The default is yes. status:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays a status bar. The default is yes for untrusted dialog windows and no for trusted dialog windows. unadorned:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the border window chrome. This feature is only available when a dialog box is opened from a trusted application. The default is no.
Return Value
Variant. Returns the value of the returnValue property as set by the window of the document specified in sURL .
Remarks
A modal dialog box retains the input focus while open. The user cannot switch windows until the dialog box is closed.
Because a modal dialog box can include a URL to a resource in a different domain, do not pass information through the vArguments parameter that the user might consider private. The vArguments parameter can be referenced within the modal dialog box using the dialogArguments property of the window object. If the vArguments parameter is defined as a string, the maximum string length that can be passed to the modal dialog box is 4096 characters; longer strings are truncated.
As of Microsoft Internet Explorer 4.0, you can eliminate scroll bars on dialog boxes. To turn off the scroll bar, set the SCROLL attribute to false in the body element for the dialog window, or call the modal dialog box from a trusted application.
Internet Explorer 5 and later allows further control over modal dialog boxes through the status and resizable values in the sFeatures parameter of the showModalDialog method. Turn off the status bar by calling the dialog box from a trusted application, such as Microsoft Visual Basic or an HTML Application (HTA), or from a trusted window, such as a trusted modal dialog box. These applications are considered to be trusted because they use Internet Explorer interfaces instead of the browser. Any dialog box generated from a trusted source has the status bar turned off by default. Resizing is turned off by default, but you can turn it on by specifying resizable=yes in the sFeatures string of the showModalDialog method.
You can set the default font settings the same way you set Cascading Style Sheets (CSS) attributes (for example, "font:3;font-size:4"). To define multiple font values, use multiple font attributes.
The default unit of measure for dialogHeight and dialogWidth in Internet Explorer 5 and later is the pixel. The value can be an integer or floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For consistent results, specify the dialogHeight and dialogWidth in pixels when designing modal dialog boxes.
For Windows Internet Explorer 7 or later, dialogHeight and dialogWidth return the height and width of the content area and no longer includes the height and width of the frame.
Internet Explorer 7 and later. Although a user can manually adjust the height of a dialog box to a smaller value provided the dialog box is resizable the minimum dialogHeight you can specify is 150 pixels, and the minimum dialogWidth you can define is 250 pixels. In versions earlier than Internet Explorer 7 the minimum value of the dialogHeight that can be specified is 100 pixels. The minimum value of the dialogHeight is 100 pixels.
To override center, even though the default for center is yes, you can specify either dialogLeft and/or dialogTop.
This method must use a user-initiated action, such as clicking on a link or tabbing to a link and pressing enter, to open a pop-up window. The Pop-up Blocker feature in Internet Explorer 6 blocks windows that are opened without being initiated by the user.
Note For Internet Explorer 7 or later, help is not a valid value for sFeatures. In previous versions, help:{ yes | no | 1 | 0 | on | off } specified whether the dialog window displays the context-sensitive Help icon.
'인터넷정보' 카테고리의 다른 글
IE,FF 의 투명도 설정 : opacity (0) | 2007.10.11 |
---|---|
insert row 테이블에 row 추가하기 (0) | 2007.10.11 |
팝업 띄우기 (0) | 2007.10.11 |
한국 전통 표준색 (0) | 2007.10.11 |
PHP용 경과시간 체크함수 /php timer 타이머/ microtime() (0) | 2007.10.11 |
showModelessDialog 를 FF에서 사용하기 (0) | 2007.10.11 |
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
showModelessDialog 를 FF에서 사용하기
<script>
function Window_modal(url, name, width, height)
{
var result = null;
/*
if (window.showModalDialog) {
window.showModalDialog(url, window, 'dialogWidth:'+width+'px;dialogHeight:'+height+'px');
} */
if (window.showModelessDialog) {
var property ='dialogWidth:'+(parseInt(width)+10)+'px;dialogHeight:'+(parseInt(height)+30)+'px;'+'scroll:no;resizable:no;help:no;center:yes;status:no;edge:sunken;unadorned:yes;';
result = window.showModelessDialog(url, window, property);
} else {
var left = (screen.width-width)/2;
var top = (screen.height-height)/3;
var property ='left='+left+',top='+top+',height='+height+',width='+width
+',toolbar=no,directories=no,status=no,linemenubar=no,scrollbars=no,resizable=no,modal=yes,dependent=yes';
result = window.open(url, name, property);
}
return result;
}</script>
열린 자식창에서
if(window.dialogArguments){
opener = window.dialogArguments;
}
처럼 해줘야 일반 팝업창과 호환이 됨.
'인터넷정보' 카테고리의 다른 글
insert row 테이블에 row 추가하기 (0) | 2007.10.11 |
---|---|
팝업 띄우기 (0) | 2007.10.11 |
한국 전통 표준색 (0) | 2007.10.11 |
PHP용 경과시간 체크함수 /php timer 타이머/ microtime() (0) | 2007.10.11 |
showModalDialog Method (IE 전용) (0) | 2007.10.11 |
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
문자열 <-> 유니코드 변환 escape(),unescape()
http://oxtag.com/php/p/unicode/StringConversion.php
http://oxtag.com/php/p/utf8_encode.php
http://oxtag.com/php/p/unicode/unicode.php
http://oxtag.com/php/p/unicode/utf_unicode.php
<style>
temp20020232 tr,*{
font-family:Arial, Helvetica, sans-serif;
font-size:9pt;
}
</style>
<script>
function char_unicode(bool){
ta1 = document.getElementById('txt_char');
ta2 = document.getElementById('txt_unicode');
if(bool)
ta2.value = escape(ta1.value);
else
ta1.value = unescape(ta2.value);
}
</script>
<table border="0" cellspacing="0" cellpadding="0" class="temp20020232">
<tr>
<td align="center"><strong>String</strong></td>
<td align="center"><strong>Unicode</strong></td>
</tr>
<tr>
<td align="center"><textarea name="txt_char" cols="40" rows="5" id="txt_char" ></textarea></td>
<td align="center"><textarea name="txt_unicode" cols="40" rows="5" id="txt_unicode2" ></textarea></td>
</tr>
<tr align="center">
<td align="center"><input type="button" name="Submit" value="escape(String)->Unicode" onClick="char_unicode(true);"></td>
<td><input type="button" name="Submit2" value="unescape(Unicode)->String" onClick="char_unicode(false);"></td>
</tr>
</table>
'인터넷정보' 카테고리의 다른 글
팝업 띄우기 (0) | 2007.10.11 |
---|---|
한국 전통 표준색 (0) | 2007.10.11 |
PHP용 경과시간 체크함수 /php timer 타이머/ microtime() (0) | 2007.10.11 |
showModalDialog Method (IE 전용) (0) | 2007.10.11 |
showModelessDialog 를 FF에서 사용하기 (0) | 2007.10.11 |
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
현재 스크롤 위치 알아내기
var getNowScroll = function(){
var de = document.documentElement;
var b = document.body;
var now = {};
now.X = document.all ? (!de.scrollLeft ? b.scrollLeft : de.scrollLeft) : (window.pageXOffset ? window.pageXOffset : window.scrollX);
now.Y = document.all ? (!de.scrollTop ? b.scrollTop : de.scrollTop) : (window.pageYOffset ? window.pageYOffset : window.scrollY);
return now;
}
소스는 어렵지 않아서 별다른 설명이 필요 없을 것 같네요.
IE7, FF2 에서 테스트 해보았으며,
사용법은 간단합니다
<input type="button" onclick="msgNowScroll()" value="지금 스크롤 위치를 알려줘">
<script type="text/javascript">
var msgNowScroll = function(){
nowScroll = getNowScroll();
alert!!(nowScroll.X + "," + nowScroll.Y);
}
</script>
'인터넷정보' 카테고리의 다른 글
한국 전통 표준색 (0) | 2007.10.11 |
---|---|
PHP용 경과시간 체크함수 /php timer 타이머/ microtime() (0) | 2007.10.11 |
showModalDialog Method (IE 전용) (0) | 2007.10.11 |
showModelessDialog 를 FF에서 사용하기 (0) | 2007.10.11 |
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
롤링 배너용 js(class 형식)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<title>롤링배너</title>
<script type="text/javascript">
/*--------------------------------
롤링배너
만든이 : mins01(공대여자)
hp : mins01.woobi.co.kr
MSN & NateOn : mins01(at)lycos.co.kr
------------=----------------------
사용법
<div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>
처럼 구조를 가져야합니다.
안의 <div>는 꼭 style.height 값을 가져야합니다.
안에서 <div>가 아닌 것은 전부 삭제됩니다.
var roll2 = new rolling_banner(document.getElementById('test2'));
roll2.start();
처럼 스크립트를 실행하면 됩니다.
----------------------------------*/
var rolling_banner = function(ta){
this.ta = ta;
// this.ta.className = 'rolling_banner';
this.ta_id = 'roll_'+(this.ta.id||this.ta.name);
this.gap = 5; //움직이는 픽셀단위
this.gap_count=0; //카운팅용:건들지 마세요
this.gap_time = '1000'; //움직이는 단위시간
this.gap_sleep = '2000'; //화면이 멈춰있을 단위시간
this.over_stop = true; //마우스를 올렸을 때 멈출 것인가?
this.timer = null;
eval!!(this.ta_id+'=this');
var temp = eval!!(this.ta_id);
this.init_div();
}
rolling_banner.prototype.start = function(){ //롤링 시작
this.ta.readonly =false;
this.stop =false;
if(!this.timer){ this.rolling(); }
}
rolling_banner.prototype.stop = function(){ //롤링 시작
this.stop =true;
}
rolling_banner.prototype.init_div = function(){ //<div> 빼고 전부 제거 , 스타일 초기화
this.ta.style.position="relative";
this.ta.style.overflow="hidden";
this.ta.onmouseover=function(){ eval!!("this.readOnly=true;"); }
this.ta.onmouseout=function(){ eval!!("this.readOnly=false;"); }
var child = this.ta.childNodes;
var ch = this.ta.firstChild;
var ch2 = null;
while(ch){
ch2 = ch.nextSibling;
if(ch.nodeName.toLowerCase() !='div'){
this.ta.removeChild(ch);
}else{
ch.style.position = "relative";
ch.style.borderStyle='none';
ch.style.top='0px';
}
ch=ch2;
}
}
rolling_banner.prototype.strtonum = function(str){
var num = parseInt(str);
if(isNaN(num)) num = '0';
return num
}
rolling_banner.prototype.strtopx = function(str){
var num = this.strtonum(str);
return num+'px';
}
rolling_banner.prototype.rolling = function(){
if(this.gap_count==0){
this.sleep();
this.gap_count+=1;
return;
}
if(!this.ta.readOnly && !this.stop){
this.rolling_top();
}
this.timer = null;
var re = this.ta_id+'.rolling()';
this.timer = setTimeout(re,this.gap_time);
}
rolling_banner.prototype.rolling_top = function(){
this.gap_count+=parseInt(this.gap);
var ch1 = this.ta.firstChild;
var child = this.ta.childNodes;
var ta_ch = null;
var top_ori = this.strtonum(child[0].style.top);
var top = this.strtopx(top_ori-parseInt(this.gap));
for(var i=0,m=child.length;i<m;i++){
child[i].style.top=top;
}
if(this.gap_count >= this.strtonum(ch1.style.height)){
var temp =ch1.cloneNode(true);
this.ta.removeChild(ch1);
this.ta.appendChild(temp);
for(var i=0,m=child.length;i<m;i++){
child[i].style.top='0px';
}
this.gap_count = 0
}
}
rolling_banner.prototype.sleep = function(){
this.timer = null;
var re = this.ta_id+'.rolling()';
this.timer = setTimeout(re,this.gap_sleep);
}
</script>
</head>
<body>
<div id="test" style="width:240px; height:80px; background-color:#CCCCCC; " ><div style=" width:200px;height:60px; background-color:#FFCCCC ;"> <a href="http://mins01.woobi.co.kr">제작자 홈피</a> </div>
테스트 무시되는 문자열
<div style="width:200px; height:40px; background-color:#CCFFCC ;"> 내용2 </div>
테스트 무시되는 문자열
<div style="width:200px; height:40px; background-color:#CCCCFF ;"> 내용3 </div>
<div style="width:200px; height:40px; background-color:#CDDCFF ;"> 내용4 </div>
<div style="width:200px; height:40px; background-color:#EECCFF ;"> 내용5 </div>
<div style="width:200px; height:40px; background-color:#CCAAFF ;"> 내용6 </div>
<div style="width:200px; height:40px; background-color:#CCAAFF ;"> 내용7 </div>
<div style="width:200px; height:40px; background-color:#CC22FF ;"> 내용8 </div>
<div style="width:200px; height:40px; background-color:#CC4AFF ;"> 내용9 </div>
<div style="width:200px; height:40px; background-color:#CC6AFF ;"> 내용10 </div>
<div style="width:200px; height:40px; background-color:#CC7AFF ;"> 내용11 </div>
<div style="width:200px; height:40px; background-color:#CC8AFF ;"> 내용12 </div>
<div style="width:200px; height:40px; background-color:#CC9AFF ;"> 내용13 </div>
<div style="width:200px; height:40px; background-color:#CCbAFF ;"> 내용14 </div>
<div style="width:200px; height:40px; background-color:#CCcAFF ;"> 내용15 </div>
<div style="width:200px; height:40px; background-color:#CCdAFF ;"> 내용16 </div>
<div style="width:200px; height:40px; background-color:#CCeAFF ;"> 내용17 </div>
<div style="width:200px; height:40px; background-color:#CCfAFF ;"> 내용18 </div>
<div style="width:200px; height:40px; background-color:#dCAAdF ;"> 내용19 </div>
<div style="width:200px; height:40px; background-color:#1C4AeF ;"> 내용20 </div>
<div style="width:200px; height:40px; background-color:#2CAAcF ;"> 내용21 </div>
<div style="width:200px; height:40px; background-color:#3CAAbF ;"> 내용22 </div>
<div style="width:200px; height:40px; background-color:#4bbAaF ;"> 내용23 </div>
<div style="width:200px; height:40px; background-color:#5C3A9F ;"> 내용24 </div>
<div style="width:200px; height:40px; background-color:#CC2A8F ;"> 내용25 </div>
<div style="width:200px; height:40px; background-color:#CC5A7F ;"> 내용26 </div>
<div style="width:200px; height:40px; background-color:#CC9A6F ;"> 내용27 </div>
<div style="width:200px; height:40px; background-color:#CC8A5F ;"> 내용28 </div>
<div style="width:200px; height:40px; background-color:#CC7A4F ;"> 내용29 </div>
<div style="width:200px; height:40px; background-color:#CC6A3F ;"> 내용30 </div>
<div style="width:200px; height:40px; background-color:#CC5A2F ;"> 내용31 </div>
<div style="width:200px; height:40px; background-color:#CC4A1F ;"> 내용32 </div>
<div style="width:200px; height:40px; background-color:#bC3AFF ;"> 내용33 </div>
<div style="width:200px; height:40px; background-color:#aC1AFF ;"> 내용34 </div>
<div style="width:200px; height:40px; background-color:#9C2AFF ;"> 내용35 </div></div>
내용1~35까지의 div 35개
<script>
var roll1 = new rolling_banner(document.getElementById('test'));
roll1.gap=1;
roll1.gap_time = '1';
roll1.gap_sleep = '1000';
roll1.start();
</script>
<p></p>
<div id="test2" style="width:200px; height:40px; overflow:hidden; background-color:#CCCCCC; ">테스트 무시되는 문자열
<div style=" width:200px;height:60px; background-color:#FFCCCC ;"> <a href="http://mins01.woobi.co.kr">제작자 홈피</a> </div>
테스트 무시되는 문자열
<div style="width:200px; height:40px; background-color:#CCFFCC ;"> 내용2 </div>
테스트 무시되는 문자열
<div style="width:200px; height:40px; background-color:#CCCCFF ;"> 내용3 </div>
<div style="width:200px; height:40px; background-color:#CDDCFF ;"> 내용4 </div>
<div style="width:200px; height:40px; background-color:#EECCFF ;"> 내용5 </div>
<div style="width:200px; height:40px; background-color:#CCAAFF ;"> 내용6 </div></div>
<script>
var roll2 = new rolling_banner(document.getElementById('test2'));
roll2.gap=1;
roll2.gap_time = '100';
roll2.gap_sleep = '1000';
roll2.start();
</script>
</body>
</html>
'인터넷정보' 카테고리의 다른 글
PHP용 경과시간 체크함수 /php timer 타이머/ microtime() (0) | 2007.10.11 |
---|---|
showModalDialog Method (IE 전용) (0) | 2007.10.11 |
showModelessDialog 를 FF에서 사용하기 (0) | 2007.10.11 |
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
스크립트 관련 인코드,디코드
http://scriptasylum.com/tutorials/encdec/encode-decode.html
HTML/text/JavaSript Escaping/Encoding Script
These scripts are intended to explain how to "hide" HTML and/or javascript from other people who view your page's source code. It is not foolproof, but it does make it more difficult to read and understand the source code. Due to the nature of how these scripts work, the explanation may seem complicated and drawn out, but be patient and it should make sense once you gain a little experience with them. You don't really have to know the ins-and-outs of these scripts, but it does help you understand how and why they work. So, take a seat and I'll do my best to make this seem as un-complicated as possible.
By the way, my stolen "popup" script at popovergenerator.com uses a similar method of doing this to hide their thievery. Check out this page for proof...
Escape/Unescape
The first section of this page explains how to "escape" any text, HTML, or Javascript to make it generally unreadable to the common user. URL Escape Codes are two-character Hexadecimal (8-bit) values preceeded by a % sign. This is used primarily in browser URLs or for use when making cookies for characters that otherwise would not work, usually because they are reserved characters (like spaces and the like).For example, if you had an HTML filename of page one, the escaped URL code would look like page%20one. The %20 is the escaped value for a space. Normally, you would only escape special characters (generally any character other than a-z, A-Z, and 0-9), but the script below actually escapes all the text simply by replacing all characters with their escaped equivalents. So, if you were to fully escape the words page one, it would look like: %70%61%67%65%20%6F%6E%65. Now, none of the text is easily decipherable even though most of it was made up of normal characters.
Since the browser can inherently handle escape codes, this can be used pretty easily without having to add any more script to decipher them. So, if you want the browser to write that escaped text to the page, you could do something like:
All I'm doing here is putting the escaped string in a set of quotes (important!), wrapping that inside the built-in unescape() method, and then wrapping that in a document.write() method. This might seem a little worthless, but you could hide an email address this way to prevent web crawlers from snagging your e-mail address from your webpage to use in mass spam e-mailings, yet allowing visitors to read it fine... Unless, of course, you actually like getting Viagra solicitations. :)
For instance, my fully escaped e-mail address would look like this to a web crawler:
... but would look like this to a visitor:
scriptasylum@hotmail.com
The two textboxes below will let you fully escape and unescape any text you want. Just type whatever text/HTML/JavaScript you want in the left box and click the --> button to fully escape it. Likewise, click the <-- button to convert it back to normal text to verify that it is the same as the original. You can copy & paste the escaped code into your page (don't forget to use the unescape() and document.write() methods).
Encoding/Decoding
Now, you probably have figured out that you could hide an entire HTML page using the above method; but there are two disadvantages to doing that: Size and ease of "cracking" your code.When you fully escape an entire page, every single character becomes 3 characters. This will triple the size of your page. Not a big deal if the page is only about 1-5 KBytes in size; but when you have a fairly large page (>10 KBytes), the filesize increases rapidly. This would slow the load time for the dial-up connection surfers out there.
Also, if someone were to look at your source code, it would be pretty easy to figure out what you are doing. Then they can simply copy & paste the code and make a small script to display the normal content. There is no absolute foolproof way (client-side) to foil someone from viewing your source if they are determined enough; the best you can hope for is to make it as inconvenient as possible.
So, to address both concerns you could encode/decode the text. Again, it won't be foolproof to keep people from stealing your source content if they really want it. I am really using the terms "encode" and "decode" loosely here; what the following script does is not considered actual encoding, but it's easier to say it that way. The encoded output will be a bit longer than the original text, but a lot less than if you had simply escaped it all.
The above section just escapes the text. The section below actually shifts the Unicode values so the result looks like gibberish. Give it a try and you'll see; don't forget to try different Code Key values from the drop-down box.
The following steps are what the script does to accomplish this effect when you click the --> (encode) button:
- First, all the text is escaped.
- Then the script finds the Unicode values for each character in the string.
- Then the script adds whatever the Code Key drop-down box value is to each character's Unicode value.
- Then the script derives characters based on the shifted Unicode values.
- The Code Key value is also embedded in the decoded text so the script knows how to properly decode the string again.
- Finally, it escapes the result one more time to remove any special characters. Now, the output looks totally foreign to someone who cannot un-shift Unicode values in their head. :)
Unfortunately, the browser does not have any built-in ability to handle the decoding, so we have to use a function for that. So, you have to escape the function that handles the decoding to hide that part, and have the browser write it to the document. You don't really have to escape the decoding function, but it will make it that much harder for someone to figure out what's going on. Then, the decoding function can be used to decode the rest of whatever content you have encoded. I'll outline the steps below one-by-one to make this less confusing.
- Escape the decoding function. Before this function is escaped, it looks like this:
<script language="javascript">
function dF(s){
var s1=unescape(s.substr(0,s.length-1)); var t='';
for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)-s.substr(s.length-1,1));
document.write(unescape(t));
}
</script>
Once escaped, the function looks like this:
%3C%73%63%72%69%70%74%20%6C%61%6E%67%75%61%67%65%3D%22%6A%61%76%61%73%63%72%69%70%74%22%3E%0D%0A%66%75%6E%63%74%69%6F%6E%20%64%46%28%73%29%7B%0D%0A%76%61%72%20%73%31%3D%75%6E%65%73%63%61%70%65%28%73%2E%73%75%62%73%74%72%28%30%2C%73%2E%6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%74%3D%27%27%3B%0D%0A%66%6F%72%28%69%3D%30%3B%69%3C%73%31%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%74%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28%73%31%2E%63%68%61%72%43%6F%64%65%41%74%28%69%29%2D%73%2E%73%75%62%73%74%72%28%73%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%0D%0A%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%74%29%29%3B%0D%0A%7D%0D%0A%3C%2F%73%63%72%69%70%74%3E
Neat huh? :)
Anyway, now you have to make the browser write that part of the script to the page by wrapping it in the document.write() and unescape() methods like this:
<script language="javascript">
document.write( unescape( '%3C%73%63%72%69%70%74%20%6C%61%6E%67%75%61%67%65%3D%22%6A%61%76%61%73%63%72%69%70%74%22%3E%0D%0A%66%75%6E%63%74%69%6F%6E%20%64%46%28%73%29%7B%0D%0A%76%61%72%20%73%31%3D%75%6E%65%73%63%61%70%65%28%73%2E%73%75%62%73%74%72%28%30%2C%73%2E%6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%74%3D%27%27%3B%0D%0A%66%6F%72%28%69%3D%30%3B%69%3C%73%31%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%74%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28%73%31%2E%63%68%61%72%43%6F%64%65%41%74%28%69%29%2D%73%2E%73%75%62%73%74%72%28%73%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%0D%0A%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%74%29%29%3B%0D%0A%7D%0D%0A%3C%2F%73%63%72%69%70%74%3E' ))
</script>
- Now that you have the decoding function on the page, you can call it to decode whatever content you have encoded. Let's say you had a script you wanted to protect; something like an image preloading script like this:
<script language="javascript">
function preloadImages(){
var iA=new Array();
for(i=0;i<arguments.length;i++){
iA[i]=new Image();
iA[i].src=arguments[i];
}}
preloadImages('img1.gif','img2.gif','img3.gif');
</script>
Once the script above is encoded using "code key" number 1, it looks like this:
%264Dtdsjqu%2631mbohvbhf%264E%2633kbwbtdsjqu%2633%264F%261E%261Bgvodujpo%2631qsfmpbeJnbhft%2639%263%3A%268C%261E%261Bwbs%2631jB%264Eofx%2631Bssbz%2639%263%3A%264C%261E%261Bgps%2639j%264E1%264Cj%264Dbshvnfout/mfohui%264Cj%2C%2C%263%3A%268C%261E%261BjB%266Cj%266E%264Eofx%2631Jnbhf%2639%263%3A%264C%261E%261BjB%266Cj%266E/tsd%264Ebshvnfout%266Cj%266E%264C%261E%261B%268E%268E%261E%261B%261E%261BqsfmpbeJnbhft%2639%2638jnh2/hjg%2638%263D%2638jnh3/hjg%2638%263D%2638jnh4/hjg%2638%263%3A%264C%261E%261B%264D0tdsjqu%264F1
Then, you decode the string and write it to the page by calling the dF() function (which was just unescaped and written to the page in the previous step) passing the string above like this:
dF('%264Dtdsjqu%2631mbohvbhf%264E%2633kbwbtdsjqu%2633%264F%261E%261Bgvodujpo%2631qsfmpbeJnbhft%2639%263%3A%268C%261E%261Bwbs%2631jB%264Eofx%2631Bssbz%2639%263%3A%264C%261E%261Bgps%2639j%264E1%264Cj%264Dbshvnfout/mfohui%264Cj%2C%2C%263%3A%268C%261E%261BjB%266Cj%266E%264Eofx%2631Jnbhf%2639%263%3A%264C%261E%261BjB%266Cj%266E/tsd%264Ebshvnfout%266Cj%266E%264C%261E%261B%268E%268E%261E%261B%261E%261BqsfmpbeJnbhft%2639%2638jnh2/hjg%2638%263D%2638jnh3/hjg%2638%263D%2638jnh4/hjg%2638%263%3A%264C%261E%261B%264D0tdsjqu%264F1');
document.write(unescape('%3C%73%63%72%69%70%74%20%6C%61%6E%67%75%61%67%65%3D%22%6A%61%76%61%73%63%72%69%70%74%22%3E%0D%0A%66%75%6E%63%74%69%6F%6E%20%64%46%28%73%29%7B%0D%0A%76%61%72%20%73%31%3D%75%6E%65%73%63%61%70%65%28%73%2E%73%75%62%73%74%72%28%30%2C%73%2E%6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%74%3D%27%27%3B%0D%0A%66%6F%72%28%69%3D%30%3B%69%3C%73%31%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%74%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28%73%31%2E%63%68%61%72%43%6F%64%65%41%74%28%69%29%2D%73%2E%73%75%62%73%74%72%28%73%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%0D%0A%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%74%29%29%3B%0D%0A%7D%0D%0A%3C%2F%73%63%72%69%70%74%3E'));dF('%264Dtdsjqu%2631mbohvbhf%264E%2633kbwbtdsjqu%2633%264F%261E%261Bgvodujpo%2631qsfmpbeJnbhft%2639%263%3A%268C%261E%261Bwbs%2631jB%264Eofx%2631Bssbz%2639%263%3A%264C%261E%261Bgps%2639j%264E1%264Cj%264Dbshvnfout/mfohui%264Cj%2C%2C%263%3A%268C%261E%261BjB%266Cj%266E%264Eofx%2631Jnbhf%2639%263%3A%264C%261E%261BjB%266Cj%266E/tsd%264Ebshvnfout%266Cj%266E%264C%261E%261B%268E%268E%261E%261B%261E%261BqsfmpbeJnbhft%2639%2638jnh2/hjg%2638%263D%2638jnh3/hjg%2638%263D%2638jnh4/hjg%2638%263%3A%264C%261E%261B%264D0tdsjqu%264F1');
</script>
I've highlighted the part that unescapes the decoder function in light yellow, and the part that decodes the preloading script and writes it to the page in light blue. You would just paste the whole section above into your page and the script would function perfectly just like it would if it were plain old English. Yes, it looks confusing, but that's the point isn't it? Oh, and one more thing: the whole string should appear on one line; you can not add forced line breaks.
The same thing is done if you want to encode a whole HTML page, except the encoded part of the string (light blue) could potentially be HUGE. The escaped function (light yellow) would not change however.
I've made a couple of wizards you can use for different purposes. You can achieve the same thing by using the escape/un-escape & encoder/decoder functions above, but these are specialized to take out some of the guesswork. Each of the links below will open a new window.
- Javascript Encoder - Designed to encode Javascript only. Useful to only encode and install a script in an already created HTML page.
- HTML Page Encoder - Designed to encode your whole HTML page. You just enter your HTML sourcecode into one box, select the encoding scheme, and press the "encode" button. The output can be pasted directly into a blank page and saved as an HTML file.
You can find a complete chart of all the UniCode values using the MS Windows charmap application.
http://scriptasylum.com/tutorials/encdec/html_encoder.html
Full HTML Page Encoder
This script will encode your whole HTML page. Just follow the directions below.
- Either change the content above or paste your entire page content into the textarea above.
- Select the "Code key" you wish to use.
- Press the "Encode" button.
- Select all the text that appears in the box below and paste it into a blank document and save it as an HTML file. The pasted code should appear all on one line in your editor, unless you have word-wrap on. Do not add any linebreaks (by pressing "Enter") or the script may not work.
'유용한정보' 카테고리의 다른 글
터키의 신기한 온천 (0) | 2007.10.12 |
---|---|
청소년권장사이트 목록 (0) | 2007.10.12 |
‘발명가’ 마이클 잭슨의 특허... ‘쓰러질 듯 서 있기’ 신발 (0) | 2007.10.12 |
닥터피쉬 (0) | 2007.10.12 |
숫자 해독 게임 (0) | 2007.10.12 |
국어의 로마자 표기법 (0) | 2007.10.10 |
유치원,초등,중등,고등학교, 고등교육기관 엑셀파일 (0) | 2007.10.10 |
흥미로운 인터넷 사전 (0) | 2007.10.10 |
휴대폰 개통일 알아보기 (0) | 2007.10.10 |
오토 차량을 운전하시는 분들이 알아야할 상식 (0) | 2007.10.10 |
try{...} catch(e){...} 구문 , e.number,e.description
try{
[ 동작구문 ]
}catch(e){
alert!('Error:'+(e.number & 0xFFFF)+':'+e.description);
}
------------------
에러는 경고창으로
"Error:번호:내용"
으로 출력된다.
try{ ... } catch(e){ ... } finally{ ... }
프로그램에서 에러를 처리 방법으로
try{
// 동작하는 프로그램 구문
}
catch(e){
// try에서 에러가 있을 경우에 동작할 구문
}finally{
// 에러가 있든 없든 실행되는 구문
}
JAVA에서 기본적으로 지원
Javascript에서도 지원
'인터넷정보' 카테고리의 다른 글
showModalDialog Method (IE 전용) (0) | 2007.10.11 |
---|---|
showModelessDialog 를 FF에서 사용하기 (0) | 2007.10.11 |
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기
//================================================================
// 문자열 바이트 알아내기
//================================================================
function cm_get_byte(str) { //문자열의 byte 길이를 알아냄(한글 2byte로 처리)
var i,m=str.length, re_count=0,val = 0;;
for(i=0;i<m;i++) {
val = escape(str.charAt(i)).length;
if(val>3) re_count++;
re_count++;
} return re_count;
}
function cm_get_byte_length(str,limit_byte){ //지정된 바이트 길이만큼의 length를 반환, 홀수로 짤리면 -1의 길이반환
var i,m=str.length, re_count=0,val = 0;;
var len_count = 0;
for(i=0;re_count<limit_byte ;i++) {
val = escape(str.charAt(i)).length;
len_count++;
if(val>3) re_count++;
re_count++;
}
if(re_count%2 == 1) return (len_count-1);
else return (len_count);
}
//================================================================
// 입력 글자바이트 제한 (필수 : 문자열 바이트 알아내기)
// textarea에 사용
//================================================================
function input_textarea_limit_byte(ta,limit){
var layout = document.createElement('table');
// layout.border='2';
layout.style.padding='0px';
layout.style.margin='0px';
if(ta &&ta.style && ta.style.width){
layout.style.width=ta.style.width
}
layout.border="0";
layout.cellspacing="0";
layout.cellpadding="0";
var tr1 = layout.insertRow(-1);
var td1 = tr1.insertCell(-1);
td1.style.padding='0px';
td1.style.textAlign='right';
var tr2 = layout.insertRow(-1);
var td2 = tr2.insertCell(-1);
td2.style.padding='0px';
td2.style.textAlign='right';
var txt_limit = document.createElement('input');
txt_limit.type='text';
txt_limit.style.borderStyle='none';
txt_limit.style.textAlign='right';
txt_limit.style.fontSize='10px';
txt_limit.style.width='40px';
txt_limit.readOnly=true;
txt_limit.value=0;
var span_text1 = document.createElement('span');
span_text1.innerHTML='Limit : ';
var span_text2 = document.createElement('span');
if(limit){
span_text2.innerHTML=' byte /'+limit+' byte';
}else{
span_text2.innerHTML=' byte ';
}
var div_title = document.createElement('div');
div_title.style.fontSize='10px';
div_title.appendChild(span_text1);
div_title.appendChild(txt_limit);
div_title.appendChild(span_text2);
if(ta.tagName.toString().toLowerCase()=='textarea'){ //textarea일 경우만
if(!ta.rows){ta.rows="3";}
var btn_0 = document.createElement('input');
btn_0.type='button';
btn_0.value='■';
btn_0.style.fontSize="10px";
btn_0.style.width="18px";
btn_0.style.height="18px";
btn_0.style.borderWidth="1px";
btn_0.onclick=function(){
this.blur();
ta.rows='3';
}
var btn_p = btn_0.cloneNode(true);
btn_p.value='▼';
btn_p.onclick=function(){
this.blur();
ta.rows=parseInt(ta.rows)+2;
}
div_title.appendChild(btn_0);
div_title.appendChild(btn_p);
}
ta.parentNode.insertBefore(layout,ta);
td1.appendChild(div_title);
td2.appendChild(ta);
ta.onkeyup=function(){
txt_limit.value= cm_get_byte(this.value)
if(limit && txt_limit.value>limit){
alert!('Max Byte = '+limit);
this.value = this.value.toString().substr(0,cm_get_byte_length(this.value,limit));
txt_limit.value= cm_get_byte(this.value)
}
}
//처음 처리
txt_limit.value= cm_get_byte(ta.value)
if(limit && txt_limit.value>limit){
ta.value = ta.value.toString().substr(0,cm_get_byte_length(ta.value,limit));
}
txt_limit.value= cm_get_byte(ta.value)
}
</script>
--------------------=------------------
사용법,
textbox나 textarea 만들고
함수 실행
<script type="text/javascript">
input_textarea_limit_byte(document.getElementById('test_textarea1'),1000);
</script>
input_textarea_limit_byte(대상[,최대 Byte]);
input_textarea_limit_byte(대상); <- 바이트 체크를 하지 않고 바이트 수만 보여줍니다.
--------------------=--------------
'인터넷정보' 카테고리의 다른 글
showModelessDialog 를 FF에서 사용하기 (0) | 2007.10.11 |
---|---|
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com
'인터넷정보' 카테고리의 다른 글
문자열 <-> 유니코드 변환 escape(),unescape() (0) | 2007.10.11 |
---|---|
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용)
<style>
.png24 {
tmp:expression!!(setPng24(this));
}
</style>
<!--전반적인 png파일 표시-->
<script>
function setPng24(obj) {
obj.width=obj.height=1;
obj.className=obj.className.replace(/\bpng24\b/i,'');
obj.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src
+"',sizingMethod='image');"
obj.src='';
return '';
}
</script>
<img class="png24" src="abc123.png" width="169" height="43" border="0">
참고로 FF에서는 안해도 잘 보임.
'인터넷정보' 카테고리의 다른 글
현재 스크롤 위치 알아내기 (0) | 2007.10.11 |
---|---|
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
JS 트리구조 메뉴
http://www.destroydrop.com/javascripts/tree/
- Unlimited number of levels
- Can be used with or without frames
- Remembers the state of the tree between pages
- Possible to have as many trees as you like on a page
- All major browsers suported
- Internet Explorer 5+
- Netscape 6+
- Opera 7+
- Mozilla
- Generates XHTML 1.0 strict validated output
- Alternative images for each node
dtree.js
example01.html
Destroydrop » Javascripts » Tree » Api
Overview
Functions
add()
Adds a node to the tree.
Can only be called before the tree is drawn.
id, pid and name are required.
Parameters
Name | Type | Description |
---|---|---|
id | Number | Unique identity number. |
pid | Number | Number refering to the parent node. The value for the root node has to be -1. |
name | String | Text label for the node. |
url | String | Url for the node. |
title | String | Title for the node. |
target | String | Target for the node. |
icon | String | Image file to use as the icon. Uses default if not specified. |
iconOpen | String | Image file to use as the open icon. Uses default if not specified. |
open | Boolean | Is the node open. |
Example
mytree.add(1, 0, 'My node', 'node.html', 'node title', 'mainframe', 'img/musicfolder.gif');
openAll()
Opens all the nodes.
Can be called before and after the tree is drawn.
Example
mytree.openAll();
closeAll()
Closes all the nodes.
Can be called before and after the tree is drawn.
Example
mytree.closeAll();
openTo()
Opens the tree to a certain node and can also select the node.
Can only be called after the tree is drawn.
Parameters
Name | Type | Description |
---|---|---|
id | Number | Identity number for the node. |
select | Boolean | Should the node be selected. |
Example
mytree.openTo(4, true);
Configuration
Variable | Type | Default | Description |
---|---|---|---|
target | String | true | Target for all the nodes. |
folderLinks | Boolean | true | Should folders be links. |
useSelection | Boolean | true | Nodes can be selected(highlighted). |
useCookies | Boolean | true | The tree uses cookies to rember it's state. |
useLines | Boolean | true | Tree is drawn with lines. |
useIcons | Boolean | true | Tree is drawn with icons. |
useStatusText | Boolean | false | Displays node names in the statusbar instead of the url. |
closeSameLevel | Boolean | false | Only one node within a parent can be expanded at the same time. openAll() and closeAll() functions do not work when this is enabled. |
inOrder | Boolean | false | If parent nodes are always added before children, setting this to true speeds up the tree. |
Example
mytree.config.target = "mytarget";
'인터넷정보' 카테고리의 다른 글
롤링 배너용 js(class 형식) (0) | 2007.10.11 |
---|---|
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
select 용 함수 모음
function select_all(ta,bool){ //모든 option 선택
if(!ta){ return; }
for(var i=0,m=ta.length;i<m;i++){
ta.options[i].selected=bool;
}
}
function select_del(ta){ //선택된 option 삭제(멀티 가능)
if(ta.selectedIndex == -1){ return; }
var ol
for(var i=ta.length-1,m=0;i>=m;i--){
if(ta.options[i].selected){
ol = ta.options[i];
ta.removeChild(ol);
}
}
ta.focus();
}
function select_copy(ta,ta2){ //선택된 option 복사(멀티 가능)
if(ta.selectedIndex == -1){ return; }
for(var i=0,m=ta.length;i<m;i++){
if(ta.options[i].selected){
var ol = ta.options[i];
var ta_ol=ol.cloneNode(true)
ta2.appendChild(ta_ol);
}
}
ta.focus();
}
function select_remove(ta,ta2){ //선택된 옵션 이동(멀티 가능)
select_copy(ta,ta2);
select_del(ta);
}
function select_updown_sel(ta,type){ //1,2,3,4(맨위,위,아래,맨아래); //선택된 option 순서 바꾸기(멀티 불가)
var sel_len = ta.length
var sel_idx = ta.selectedIndex;
if(sel_idx==-1){alert!!('대상을 선택해주세요.'); return;}
if(type<3 && sel_idx==0 ){ alert!!('대상이 맨 위에있습니다'); return; }
if(type>2 && sel_idx==(sel_len-1) ){ alert!!('대상이 맨 아래에있습니다'); return; }
switch(type){
case 1:
select_goto(ta,sel_idx,0);
break;
case 2:
select_goto(ta,sel_idx,sel_idx-1);
break;
case 3:
select_goto(ta,sel_idx,sel_idx+1);
break;
case 4:
select_goto(ta,sel_idx,(sel_len-1));
break;
}
}
function select_goto(ta,st,ed){
var ta_num =-1;
var ol,ta_ol;
if(st<0 || ed<0 || st >=ta.length || ed >=ta.length ) return;
if(st<ed){
while(st<ed){
ta_num=st+1;
ol = ta.options[st].cloneNode(true);
ta_ol = ta.options[ta_num].cloneNode(true);
ta.options[ta_num]=new Option(ol.innerHTML,ol.value,false,true);
ta.options[st]=new Option(ta_ol.innerHTML,ta_ol.value,false,false);
st=ta_num;
}
}else if(st>ed){
while(st>ed){
ta_num=st-1;
ol = ta.options[st].cloneNode(true);
ta_ol = ta.options[ta_num].cloneNode(true);
ta.options[ta_num]=new Option(ol.innerHTML,ol.value,false,true);
ta.options[st]=new Option(ta_ol.innerHTML,ta_ol.value,false,false);
st=ta_num;
}
}
}
'인터넷정보' 카테고리의 다른 글
try{...} catch(e){...} 구문 , e.number,e.description (0) | 2007.10.11 |
---|---|
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기
$db['to_charset'] = 'UTF-8';
$db['from_charset'] ='EUC-KR';
- $row[$key] = mb_convert_encoding($value,$db['to_charset'],$db['from_charset']);
- $row[$key] = iconv ($db['from_charset'],$db['to_charset'] , $value );
'인터넷정보' 카테고리의 다른 글
문자열 바이트 길이알기, 바이트만큼 자르기 (0) | 2007.10.11 |
---|---|
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점)
IE7.0 에따른 이슈사항들
1. window.status
window.status 코드가 인터넷 영역에서 실행되지 않습니다
단 로컬에서는 됩니다 즉 로컬에 저장된 html을 실행하면 window.status가 먹지만
인터넷에 있는 window.status는 실행되지 않네요
개인적으로 js 디버깅시 자주 사용하곤 했는데 아쉬운 부분입니다 ㅠ.ㅠ
2.
HTML3.2 스펙에 따라
그렇지 않으면 인식하지 않는다네요
예전엔 base태그를 간간히 썼지만 요즘은 frame 을 잘 사용하지 않아서인지 거의 사용하진 않죠
3. window.close()
window.close()시 나타나는 프롬프트를 회피하기 위해 window.opener 를 사용했었는데
더이상 아래 코드는 먹지 않고 창을 닫겠냐는 프롬프트가 뜨게 됩니다
패치 : http://haco.tistory.com/1118
4. _search
_search를 통해 검색창을 더이상 열지 못합니다
5. window.prompt()
디폴트로 block 됩니다
6. 제한되는 메쏘드들
클립보드 저장, 및 클립보드 데이터 가져오기등의 메쏘드들이 제한됩니다
해보니 보안경고창이 뜨더군요
MS에서는 clipboardData 객체 사용을 권고하지 않습니다
7. Modal 및 Modeless Dialog 크기가 변경!
한마디로 크기가 커집니다 -0- (짜증)
사이즈를 지정하면 content 크기를 의미합니다
8. 새창으로 뜰때 주소줄 보임
더이상 새창을 window.open 의 property 특성으로 조절할 수 없습니다
무조건 주소창이 나타납니다 아주~ 짜증 이빠십니다 ㅠ.ㅠ
9. window.resizeTo!()
window.resiztTo 함수는 에러가 발생하거나 차단됩니다
10. HTTP, HTTPS 혼합된 인터넷 영역에서 보안 경고가 발생합니다
11. SELECT가 windowed element로 개선
이전까지는 SELECT Element가 Windowsed Element였기 때문에 다른 element와 달리 별도의 MSHTML pane에서 rendering되었습니다
즉 SELECT가 그림과 같이 layer들을 다 먹어버렸었는데, 이젠 그렇지 않다는거죠
요거 하나는 좋아졌네요 -0-
12. 스크립트 차단
6.0 까지는 아래 코드가 실행되어 보안에 매우 취약했었습니다 (XSS)
7.0 부터는 아예 실해이 안되네요
FF 2.0 도 실행이 안되는군요 ^^
13. CSS
100%는 아니지만 CSS2.1 표준 구현 강화가 되었습니다
또한 태그에서만 가능했던 :hover나 background-attachment: 가 모든 태그에서 사용가능해 졌습니다
11월 18일에 한글판 IE7이 배포되며 3주후에는 자동 업데이트를 통해 IE7가 설치가 된다고 합니다
슬슬 준비하셔야 할겁니다
위에 열거한 사항들은 대부분 인터넷 옵션의 "보안"항목에서 수정할 수 있지만
중요한점은 이 사항들이 기본빵이라는점이겠죠 -0-
이밖에도 알려진 버그로는 "신뢰할수 있는 사이트"에 추가를 했는데도, 보안창이 뜬다든가,
flash에서 _blank로 새창을 열면 자기 자신창에서 열린다든가 하는 버그가 있다고 합니다
내년에 왼도 비스타가 나오면 한번더 보안관련된 사항들이 많이 나올듯 합니다
웹프로그래머로써 프로그램하기 점점 힘들어 지네요 징징
'인터넷정보' 카테고리의 다른 글
API를 모와둔 사이트 gotapi.com (0) | 2007.10.11 |
---|---|
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>이미지 없이 라운딩 박스 표현하기!</title>
<style type="text/css">
.rtop, .rbottom{display:block}
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; background:#CCCCCC}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.r4{margin: 0 1px; height: 2px}
.box { background:#CCCCCC; padding:5px 10px; font-size:12px; font-size:12px}
</style>
</head>
<body>
<div id="container">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<div class="box">이미지 없이 라운딩 박스 표현하기!</div>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>
</body>
</html>
'인터넷정보' 카테고리의 다른 글
PNG24 반투명 지원법 (IE용) (0) | 2007.10.11 |
---|---|
JS 트리구조 메뉴 (0) | 2007.10.11 |
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
주민/외국인 등록번호
/* Creator : shj at xenosi.de if(false == (birth = checkPersonalNo(주민번호))) 틀렸어요; 년 = birth[0]; 월 = birth[1]; 일 = birth[2]; if(birth[3]) 외국인; */ function checkPersonalNo(personal_no) { personal_no = personal_no.replace(/[^\d]+/g, ''); pattern = /^[0-9]{6}[1-8][0-9]{6}$/; if(!pattern.test(personal_no)) { return false; } var birth = new Array(); birth[0] = personal_no.substr(0, 2); switch(personal_no.charAt(6)) { case '1': case '2': birth[0] = ('19' + birth[0]) * 1; birth[3] = false; break; case '3': case '4': birth[0] = ('20' + birth[0]) * 1; birth[3] = false; break; case '5': case '6': birth[0] = ('19' + birth[0]) * 1; birth[3] = true; break; case '7': case '8': birth[0] = ('20' + birth[0]) * 1; birth[3] = true; break; /*case '9': // 이렇게 늙은 사람은 있어도 안받아요. 위의 정규식에서 안받음. case '0': birth[0] = ('18' + birth[0]) * 1; birth[3] = true; break;*/ } birth[1] = personal_no.substr(2, 2) * 1; birth[2] = personal_no.substr(4, 2) * 1; if(birth[1] < 1 || birth[1] > 12) { return false; } if(birth[2] < 1 || birth[2] > 31) { return false; } var check = 0; var mul = 2; if(birth[3]) { if(((personal_no.charAt(7) * 10 + personal_no.charAt(8)) % 2) != 0) { return false; } } for(i = 0; i < 12; i ++) { check += personal_no.charAt(i) * mul; mul ++; if(mul > 9) { mul = 2; } } check = 11 - (check % 11); if(check > 9) { check %= 10; } if(birth[3]) { check += 2; if(check > 9) { check %= 10; } } if(check != personal_no.charAt(12)) { return false; } return birth; } /* License : Public Domain */ |
'인터넷정보' 카테고리의 다른 글
JS 트리구조 메뉴 (0) | 2007.10.11 |
---|---|
select 용 함수 모음 (0) | 2007.10.11 |
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램..
2007년 11월 6일 인터넷익스플로러7 자동다운로드 강제업데이트 막는 프로그램.. http://www.microsoft.com/downloads/details.aspx?FamilyId=4516A6F7-5D44-482B-9DBD-869B4A90159C&displaylang=en 강제 업데이트를 막는 도구 내려받는 링크입니다. 1. 받아서 압축 풀고 2. command 창 띄우고(시작 - 실행 - cmd 입력 후 엔터) 3. 1의 압축 푼 폴더로 이동 4. IE70Blocker.cmd /b 입력하면 자동업데이트 되지 않습니다. 5. 추후 ie7로 가고 싶을 때는 IE70Blocker.cmd /u 입력하면 막아놓은 자동업데이트가 풀립니다. 6. 자세한 내용은 압축풀면 나오는 IE70BlockerHelp.htm 를 참고하세염. |
'인터넷정보' 카테고리의 다른 글
select 용 함수 모음 (0) | 2007.10.11 |
---|---|
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기.
IE6, IE7 경고없이 윈도우 창닫기. 지금 보고 있는 웹 페이지에서 창을 닫으려고 합니다. 이 창을 닫으시겠습니까? 요런 메시지 없애줍니다. 이전 IE6은 아래걸로도 가능했는데.. self.opener = self; self.close(); 11월6일 부터인가 XP 정품인증이든 아니든 IE7로 강제 업데이트 한다고 합니다. onclick="top.window.opener = top;top.window.open('','_parent', '');top.window.close();" <script language='javascript'> function win_close(){ top.window.opener = top; top.window.open('','_parent', ''); top.window.close(); } </script> <a href="#None" onclick="Javascript:win_close();">Close</a> <input type=button value='Close' onclick="Javascript:win_close();"> p.s : 강제 업데이트 막는 프로그램 - http://haco.tistory.com/1119 |
'인터넷정보' 카테고리의 다른 글
UTF-8로 바꾸는 법, 문자열 인코딩 바꾸기 (0) | 2007.10.11 |
---|---|
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate)
많은 사람들이 디카로 사진을 찍잖너! 또한 사진을 미니홈피나 블로그 등에 올릴 때 흑백처리를 해서 올리는 경우가 많걸랑!
근데! 간혹 흑백처리를 한 다음 중요한 부분이나 부각하고 싶은 부분을 따로 칼라로 하고 싶은 경우가 있을거야!
나도 처음 포토샵을 사용할 때 잘 몰라서 아주 대담한 방법을 사용했는데, 잘 살펴보니 아주 간단한 방법이 있더라구!
참! 한가지 주의할 부분은 인터넷을 통해 구한 사진 중에서 이 효과가 제대로 적용되지 않는 것도 있어! 왜냐면 여러 사람들 손을 통해 사진의 변형 등으로 사진이 가지고 있는 원래 속성이 잃어버리는 경우가 있걸랑!
그렇다고 전부 안되는 것은 아니구! 그러나 디카로 찍은 사진을 100% 됨.
[일단] 이해해야 할 부분이 있는데, 보통 흑백 사진을 만드는 방법 중에서 [Image] 메뉴의 [mode - Grayscale]과 [Image] 메뉴의 [Adjustments - Desaturate]을 많이 사용하는거 같애!
물론 [Image] 메뉴의 [Adjustments - Hue/Saturation]에서 Saturation의 값을 -100으로 해도 흑백사진을 만들 수 있어! 그러나 mode와 Adjustments의 흑백사진은 분명히 차이가 있어
mode에서 Grayscale은 사진이 가지고 있는 색상정보를 빼고 명암 정보만을 남기는 것을 말하구!
Adjustments 에서 Desaturate는 사진이 가지고 있는 색상정보는 남겨두고, 단지 채도감소를 통해 흑백사진처럼 만드는 거야!
따라서 Desaturate으로 하면 사진은 원래의 색상정보를 가지고 있긴 때문에 특정 부분에 대한 색을 복원할 수 있어!
1) 포토샵을 실행하고, 사진을 불러온 다음 [Image] 메뉴의 [Adjustments - Desaturate] 클릭!
2) 채도감소로 흑백사진으로 되어 있을거야! 그런 툴박스에 히스토리 브러쉬 툴[History Brush Tool]을 클릭
3) 그런 다음에는 원하는 부분을 문질러! 계속 문지르는 부분이 칼라로 변할거야! 축소/확대(Zoom)을 통해 세세하게 해주면 더욱 좋구
<참고> 각종 브러시을 사용하다가 크기가 너무 큰 경우나 작은 경우 브러스의 모양을 조절할 필요가 생겨! 이런 위에 있는 옵션 바에서 크기를 조정해서 사용하는데, 때로는 귀찮지! 그래서 단축키는 사용하면 편해! 키보에서 ( [ ) 과 ( ] )인데! ( [ ) : 작게, ( ] ) : 크게
4) 어때? 쉽지! 그럼 잘해봐바바바바!
http://blog.naver.com/formmail/20003176853
그냥 단순히 원하는 색외에 전부 흑백으로 하는 방법은 간단하게 원하는 색을 마법봉으로 선택을 하던지 올가미툴로 범위를 선택하던지 한후에 ctrl+shift+i 로 선택영역을 반전시킨 후 메뉴 image-abjustments-desaturate(단축키는 ctrl+shift+u) 를 하면 선택한 영역외에 다 흑백으로 바뀜니다. 선택영역을좀더 세밀하게 조절하려면 퀵마스크모드로 선택영역을 잡는것이 좋겠지요.
'인터넷정보' 카테고리의 다른 글
IE7의 변경(오류,버그,바뀐점) (0) | 2007.10.11 |
---|---|
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>이미지 없이 라운딩 보더 표현하기!</title>
<style>
.rtop, .rbottom{display:block;}
.rtop *, .rbottom *{display:block; height:1px; overflow:hidden;}
.r1{margin:0 5px; background:#CCCCCC}
.r2{margin:0 3px; border-left:2px solid #CCCCCC; border-right:2px solid #CCCCCC;}
.r3{margin:0 2px; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC;}
.r4{margin:0 1px; height:2px; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC;}
.box { margin:0; padding:5px 10px; border-left:#CCCCCC solid 1px; border-right:#CCCCCC solid 1px; font-size:12px}
</style>
</head>
<body>
<div id="container" style="background: #fff">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<div class="box">이미지 없이 라운딩 보더 표현하기!</div>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b></div>
</body>
</html>
'인터넷정보' 카테고리의 다른 글
이미지 없이 라운딩 박스 표현하기1 (0) | 2007.10.11 |
---|---|
주민/외국인 등록번호 (0) | 2007.10.11 |
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>이미지 없이 라운딩 박스 + 보더 표현하기!</title>
<style>
.rtop, .rbottom{display:block;}
.rtop *, .rbottom *{display:block; height:1px; overflow:hidden;}
.r1{margin:0 5px; background:#CCCCCC}
.r2{margin:0 3px; border-left:2px solid #CCCCCC; border-right:2px solid #CCCCCC; background:#EEEEEE}
.r3{margin:0 2px; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; background:#EEEEEE}
.r4{margin:0 1px; height:2px; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; background:#EEEEEE}
.box{ margin:0; padding:5px 10px; border-left:#CCCCCC solid 1px; border-right:#CCCCCC solid 1px; background:#EEEEEE; font-size:12px}
</style>
</head>
<body>
<div id="container" style="background: #fff">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<div class="box">이미지 없이 라운딩 박스 + 보더 표현하기!</div>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b></div>
</body>
</html>
'인터넷정보' 카테고리의 다른 글
주민/외국인 등록번호 (0) | 2007.10.11 |
---|---|
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
숫자에 콤마 붙이기
//============================================================
// 돈 숫자에 ',' 붙이기
//============================================================
function money_point(str){ //함수형
str = parseInt(str,10);
str = str.toString().replace(/[^-0-9]/g,'');
while(str.match(/^(-?\d+)(\d{3})/)) {
str = str.replace(/^(-?\d+)(\d{3})/, '$1,$2');
}
return str;
}
String.prototype.money_point = function(){ //프로토타입형
str=this;
str = parseInt(str,10);
str = str.toString().replace(/[^-0-9]/g,'');
while(str.match(/^(-?\d+)(\d{3})/)) {
str = str.replace(/^(-?\d+)(\d{3})/, '$1,$2');
}
return str;
}
--------------------------------------------------------------------------------
<INPUT style="TEXT-ALIGN: right" onchange="this.value = money_point(this.value);" size=60>
<INPUT style="TEXT-ALIGN: right" onchange="this.value = this.value.toString().money_point();" size=60>
'인터넷정보' 카테고리의 다른 글
인터넷익스플로러7 자동다운로드 막는 프로그램.. (0) | 2007.10.11 |
---|---|
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
라디오 선택된 값 가져오기
<!--StartFragment-->
<SCRIPT>
//============================================================
// 라디오버튼 타입에서 선택된 값 가져오기
//============================================================
function get_radio_value(radios){
var len = radios.length;
if(!len && radios.checked){ return radios.value; }
for(var i=0,m=radios.length;i<m;i++){
if(radios[i].checked)
{ return radios[i].value; }
}
}
</SCRIPT>
<HR id=null>
<P></P>
<FORM name=test>
<P>
<INPUT type=radio value=0 name=pro_period required this_name="기간"> 0년
<INPUT type=radio CHECKED value=1 name=pro_period> 1 년
<INPUT type=radio value=2 name=pro_period> 2 년
<INPUT type=radio value=3 name=pro_period> 3 년
</P>
<INPUT onclick=alert(get_radio_value(test.pro_period)) type=button value=test>
</FORM>
http://www.rainny.pe.kr/33
<html>
<head>
<script language="javascript">
<!--
//체크된 라디오 버튼의 value 값을 가져오는 스크립트
function getRadioValue(obj) {
var len = obj.length;
if(!len && obj.checked) {
return obj.value;
}
for( var i =0, m=obj.length; i < m; i++) {
if( obj[i].checked) {
return obj[i].value;
}
}
}
function alertRadio() {
alert(getRadioValue(document.aaa.ANS));
}
//-->
</script>
</head>
<body>
<form name="aaa">
<input type='radio' name='ANS' value='1'>
<input type='radio' name='ANS' value='2'>
<input type='radio' name='ANS' value='3'>
</form>
</body>
</html>
'인터넷정보' 카테고리의 다른 글
익스6, 7 경고없이 윈도우 조용히 창닫기. (0) | 2007.10.11 |
---|---|
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
현재 페이지 쿠키 알아내기 (0) | 2007.10.10 |
input text용 updown 버튼
//============================================================================
// input text용 updown 버튼
//============================================================================
function input_print_updown(this_s,v_min,v_max,step){
//==========================
// 초기화
//==========================
if(this_s.type!='text'){return;}
this_s.value = parseFloat(this_s.value);
if(!isFinite(step))step=1;
if(isFinite(v_max) && this_s.value>=v_max){this_s.value=v_max;}
if(isFinite(v_min) && this_s.value<=v_min){this_s.value=v_min;}
//==========================
// SPAN에 출력후 textbox를 속에 넣는다
//========================== if(!step) step=1;
var span = document.createElement('span');
//span.style.borderStyle='solid';
if (this_s.nextSibling)
this_s.parentNode.insertBefore(span,this_s.nextSibling);
else this_s.parentNode.appendChild(span);
span.appendChild(this_s);
//==========================
// 버튼 생성부
//==========================
var input_m = document.createElement('input');
input_m.type='button';
input_m.value='-';
input_m.className = this_s.className;
input_m.style.fontSize = this_s.style.fontSize;
input_p = input_m.cloneNode(input_m);
input_p.value='+';
//==========================
// 버튼 이벤트 생성부
//==========================
to =null;
var to_clear = function(){ clearTimeout(to); }//타임아웃 클리어
var m = function(){
var t = parseFloat(this_s.value);
if(isFinite(v_min) && t<=v_min){to_clear();return;}
this_s.value=t-step;
}
var m_d = function(){
m();to = setTimeout(m_d,200);
}
var p = function(){
var t = parseFloat(this_s.value);
if(isFinite(v_max) && t>=v_max){to_clear();return;}
this_s.value=t+step;
}
var p_d = function(){
p();to = setTimeout(p_d,200);
}
input_m.onmousedown = m_d;
input_m.onmouseout = to_clear;
input_m.onmouseup = to_clear;
input_p.onmousedown = p_d;
input_p.onmouseout = to_clear;
input_p.onmouseup = to_clear;
//==========================
// 버튼을 붙인다.
//==========================
span.appendChild(input_m);
span.appendChild(input_p);
}
<input name="test" type="text" id="test" value="20" size="5" maxlength="5" />
<script>input_print_updown(document.getElementById('test'),0,50);</script>
'인터넷정보' 카테고리의 다른 글
흑백사진속에 특정 부분 칼라 만들기(Desaturate) (0) | 2007.10.11 |
---|---|
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
현재 페이지 쿠키 알아내기 (0) | 2007.10.10 |
바이러스 백신 소프트웨어 공급업체 목록 (0) | 2007.10.10 |
입력 글자바이트 제한 textarea,textbox용
<SCRIPT>
//================================================================
// 문자열 바이트 알아내기
//================================================================
function cm_get_byte(str) { //문자열의 byte 길이를 알아냄(한글 2byte로 처리)
var i,m=str.length, re_count=0,val = 0;;
for(i=0;i<m;i++) {
val = escape(str.charAt(i)).length;
if(val>3) re_count++;
re_count++;
} return re_count;
}
function cm_get_byte_length(str,limit_byte){ //지정된 바이트 길이만큼의 length를 반환, 홀수로 짤리면 -1의 길이반환
var i,m=str.length, re_count=0,val = 0;;
var len_count = 0;
for(i=0;re_count<limit_byte ;i++) {
val = escape(str.charAt(i)).length;
len_count++;
if(val>3) re_count++;
re_count++;
}
if(re_count%2 == 1) return (len_count-1);
else return (len_count);
}
//================================================================
// 입력 글자바이트 제한 (필수 : 문자열 바이트 알아내기)
// textarea에 사용
//================================================================
function input_textarea_limit_byte(ta,limit){
var layout = document.createElement('table');
// layout.border='2';
layout.style.padding='0px';
layout.style.margin='0px';
if(ta &&ta.style && ta.style.width){
layout.style.width=ta.style.width
}
layout.border="0";
layout.cellspacing="0";
layout.cellpadding="0";
var tr1 = layout.insertRow(-1);
var td1 = tr1.insertCell(-1);
td1.style.padding='0px';
td1.style.textAlign='right';
var tr2 = layout.insertRow(-1);
var td2 = tr2.insertCell(-1);
td2.style.padding='0px';
td2.style.textAlign='right';
var txt_limit = document.createElement('input');
txt_limit.type='text';
txt_limit.style.borderStyle='none';
txt_limit.style.textAlign='right';
txt_limit.style.fontSize='10px';
txt_limit.style.width='40px';
txt_limit.readOnly=true;
txt_limit.value=0;
var span_text1 = document.createElement('span');
span_text1.innerHTML='Limit : ';
var span_text2 = document.createElement('span');
if(limit){
span_text2.innerHTML=' byte /'+limit+' byte';
}else{
span_text2.innerHTML=' byte ';
}
var div_title = document.createElement('div');
div_title.style.fontSize='10px';
div_title.appendChild(span_text1);
div_title.appendChild(txt_limit);
div_title.appendChild(span_text2);
if(ta.tagName.toString().toLowerCase()=='textarea'){ //textarea일 경우만
if(!ta.rows){ta.rows="3";}
var btn_0 = document.createElement('input');
btn_0.type='button';
btn_0.value='■';
btn_0.style.fontSize="10px";
btn_0.style.width="18px";
btn_0.style.height="18px";
btn_0.style.borderWidth="1px";
btn_0.onclick=function(){
this.blur();
ta.rows='3';
}
var btn_p = btn_0.cloneNode(true);
btn_p.value='▼';
btn_p.onclick=function(){
this.blur();
ta.rows=parseInt(ta.rows)+2;
}
div_title.appendChild(btn_0);
div_title.appendChild(btn_p);
}
ta.parentNode.insertBefore(layout,ta);
td1.appendChild(div_title);
td2.appendChild(ta);
ta.onkeyup=function(){
txt_limit.value= cm_get_byte(this.value)
if(limit && txt_limit.value>limit){
alert!!('Max Byte = '+limit);
this.value = this.value.toString().substr(0,cm_get_byte_length(this.value,limit));
txt_limit.value= cm_get_byte(this.value)
}
}
//처음 처리
txt_limit.value= cm_get_byte(ta.value)
if(limit && txt_limit.value>limit){
ta.value = ta.value.toString().substr(0,cm_get_byte_length(ta.value,limit));
}
txt_limit.value= cm_get_byte(ta.value)
}
</SCRIPT>
<HR>
<TEXTAREA id=test_textarea1 name=test_textarea1 rows=10 cols=50>"공대여자는 이쁘다."를 나타내야 쓸 수 있습니다.</TEXTAREA>
<SCRIPT type=text/javascript>
input_textarea_limit_byte(document.getElementById('test_textarea1'),1000);
</SCRIPT>
<HR>
<INPUT id=test_textarea2 size=50 value="'공대여자는 이쁘다.'를 나타내야 쓸 수 있습니다.'공대여자는 이쁘다.'를 나타내야 쓸 수 있습니다.'공대여자는 이쁘다.'를 나타내야 쓸 수 있습니다." name=test_textarea2>
<SCRIPT type=text/javascript>
input_textarea_limit_byte(document.getElementById('test_textarea2'),50);
</SCRIPT>
<HR>
<TEXTAREA id=test_textarea3 name=test_textarea3 rows=10 cols=50>"공대여자는 이쁘다."를 나타내야 쓸 수 있습니다.</TEXTAREA>
<SCRIPT type=text/javascript>
input_textarea_limit_byte(document.getElementById('test_textarea3'));
</SCRIPT>
'인터넷정보' 카테고리의 다른 글
이미지 없이 라운딩 박스 표현하기 2 (0) | 2007.10.11 |
---|---|
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
현재 페이지 쿠키 알아내기 (0) | 2007.10.10 |
바이러스 백신 소프트웨어 공급업체 목록 (0) | 2007.10.10 |
간단한 중요 DB정보 보호방법 (0) | 2007.10.10 |
mysql 기본명령어
mysql>show status;
//데이터베이스의 설정환경변수와 값보기
show variables;
//현재 데이터베이스에 연결된 프로세스들 보기
show processlist;
//테이블생성
'인터넷정보' 카테고리의 다른 글
이미지 없이 라운딩 박스 표현하기 3 (0) | 2007.10.11 |
---|---|
숫자에 콤마 붙이기 (0) | 2007.10.11 |
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
현재 페이지 쿠키 알아내기 (0) | 2007.10.10 |
바이러스 백신 소프트웨어 공급업체 목록 (0) | 2007.10.10 |
간단한 중요 DB정보 보호방법 (0) | 2007.10.10 |
SSL관련 개인키, CSR 만드는 방법 (0) | 2007.10.10 |
윈도우용 주요 프로세스 목록이 있는 사이트
http://www.liutilities.com/products/wintaskspro/processlibrary/security/
중요 윈도우용 프로세스 목록을 볼 수 있다.
악성에서부터 윈도우 기본 프로세스 등을 확인할 수 있다.
WinTasks Process Library
In the recesses of your computer, 20-30 invisible processes run silently in the background. Some hog system resources, turning your PC into a sluggish computer. Worse yet, other useless processes harbour spyware and Trojans - violating your privacy and giving hackers free reign on your computer. WinTasks Process Library is an invaluable resource for anyone who wants to know the exact purpose of every single process. The categories available online are:
Top Security Risks Listed in the WinTasks Process Library
Recommended: Scan Your System for Errors Now
Avoid frequent error mesasges, slow start-ups and poor system performance by running a free system scan today.
Other Process Categories:
- Top System Processes
- Top Security Risks
- Top Applications
- Other Processes ( A to Z )
'인터넷정보' 카테고리의 다른 글
숫자에 콤마 붙이기 (0) | 2007.10.11 |
---|---|
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
현재 페이지 쿠키 알아내기 (0) | 2007.10.10 |
바이러스 백신 소프트웨어 공급업체 목록 (0) | 2007.10.10 |
간단한 중요 DB정보 보호방법 (0) | 2007.10.10 |
SSL관련 개인키, CSR 만드는 방법 (0) | 2007.10.10 |
IE flash 패치용 - 이올라스, 플래시 테두리 (0) | 2007.10.10 |
화제의 원더걸스 초미니 홍대 게릴라 콘서트
원더걸스 초미니 홍대 게릴라 콘서트 동영상.
이 콘서트로 홍대 일대 교통이 마비되었다고 한다.
'세상다반사' 카테고리의 다른 글
짐바브웨에선 저녁 한끼값이 무려 ‘600만 달러’ (0) | 2007.10.17 |
---|---|
무려 25m 세계서 가장 긴 중국버스 (0) | 2007.10.17 |
한반도에 또 하나의 ‘태양’이 떴다 (0) | 2007.10.17 |
비, 코스닥 상장사 세이텍 인수…엔터테인먼트 사업 추진 (0) | 2007.10.17 |
14일 올라온 디워 미국관객 반응 (0) | 2007.10.17 |
정조의 한글 편지 (0) | 2007.10.07 |
MBC대학가요제 '대상', 한양여대 10인조 'B2'에게로 (0) | 2007.10.07 |
타이푼 솔비, 방송중 앞가슴 단추 풀려 (0) | 2007.10.06 |
토익 성적확인 사이트 개인정보 `유출' (0) | 2007.10.06 |
주민번호 中-대만에 노출 44% 증가 (0) | 2007.10.06 |
현재 페이지 쿠키 알아내기
javascript:alert(decodeURIComponent(document.cookie.toString()).replace(/;/g,';\n'));
javascript:alert(document.cookie.toString()).replace(/;/g,';\n');
인코딩된거 디코딩해주고, 줄바꿈해줌
'인터넷정보' 카테고리의 다른 글
라디오 선택된 값 가져오기 (0) | 2007.10.11 |
---|---|
input text용 updown 버튼 (0) | 2007.10.11 |
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
바이러스 백신 소프트웨어 공급업체 목록 (0) | 2007.10.10 |
간단한 중요 DB정보 보호방법 (0) | 2007.10.10 |
SSL관련 개인키, CSR 만드는 방법 (0) | 2007.10.10 |
IE flash 패치용 - 이올라스, 플래시 테두리 (0) | 2007.10.10 |
file에 스킨 입히기 - 첨부파일 (0) | 2007.10.10 |
바이러스 백신 소프트웨어 공급업체 목록
바이러스 백신 소프트웨어 공급업체 목록 | ||||||||||||||||||||||||||||||||||||||||||||
바이러스 백신 소프트웨어는 바이러스를 감지하고 예방하도록 특별히 설계된 소프트웨어입니다. 컴퓨터에서 바이러스 백신 소프트웨어를 사용하는 것이 좋습니다. 이 문서에는 독립된 바이러스 백신 소프트웨어 공급업체 목록이 포함되어 있습니다. 다양한 Microsoft 제품에서 동작하도록 설계된 추가 바이러스 백신 리소스와 바이러스 백신 제품 목록을 보려면 다음 Microsoft 웹 사이트를 방문하십시오. http://www.microsoft.com/security/antivirus/default.mspx (http://www.microsoft.com/security/antivirus/default.mspx) AhnLab, Inc.
Aladdin Knowledge Systems
ALWIL Software
Authentium, Inc.
Computer Associates International, Inc.
Doctor Web, Ltd.
Eset
FRISK Software International
F-Secure Corp.
GFI Software Ltd
Grisoft
HAURI Inc.
Kaspersky Lab
McAfee, Inc.자세한 내용을 보려면 다음 McAfee, Inc. 웹 사이트를 방문하십시오. http://www.mcafeeb2b.com (http://www.mcafeeb2b.com)MicroWorld Technologies, Inc.
Norman
Panda Software
Proland Software
Sophos
Sybari Software, Inc.
SymantecloadTOCNode(2, 'moreinformation'); 자세한 내용을 보려면 다음 Symantec 웹 사이트를 방문하십시오. http://www.symantec.com/microsoft (http://www.symantec.com/microsoft)Trend Micro, Inc.
| ||||||||||||||||||||||||||||||||||||||||||||
원문 : http://support.microsoft.com/kb/49500/ko?FR=1&PA=1&SD=HSCH |
'인터넷정보' 카테고리의 다른 글
input text용 updown 버튼 (0) | 2007.10.11 |
---|---|
입력 글자바이트 제한 textarea,textbox용 (0) | 2007.10.11 |
mysql 기본명령어 (0) | 2007.10.11 |
윈도우용 주요 프로세스 목록이 있는 사이트 (0) | 2007.10.11 |
현재 페이지 쿠키 알아내기 (0) | 2007.10.10 |
간단한 중요 DB정보 보호방법 (0) | 2007.10.10 |
SSL관련 개인키, CSR 만드는 방법 (0) | 2007.10.10 |
IE flash 패치용 - 이올라스, 플래시 테두리 (0) | 2007.10.10 |
file에 스킨 입히기 - 첨부파일 (0) | 2007.10.10 |
회색 컬러, 그레이 색상 (0) | 2007.10.10 |