000000.1원팁 ^^ 자스로 아이프레임 target 제어
그냥 심심해서 만들어 보았어요.
아이프레임에 문서를 자스를 통해서 불러오는데요.
target를 변경하는 소스에요.
<HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--
window.onload = convertUrlLink;
function $(o){ return document.getElementById(o); }
function convertUrlLink(){
var obj = $("TextArea1");
var rUrlRegex = /((<a href=)*(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\wㄱ-ㅎㅏ-ㅣ가-힣\;\- \.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])"?)(>)/gi
var rTarget = " target='_blank'\>";
obj.value = obj['value']['replace'](rUrlRegex, "$1" + rTarget);
}
//-->
</SCRIPT>
<BODY>
<textarea id="TextArea1" cols="520" rows="25">
<BODY style="SCROLLBAR-ARROW-COLOR: #d2e5f4; SCROLLBAR-FACE-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #9ebfe8; FONT-FAMILY: gulim; SCROLLBAR-HIGHLIGHT-COLOR: #d2e5f4; SCROLLBAR-SHADOW-COLOR: #d2e5f4; FONT-SIZE: 10pt; SCROLLBAR-TRACK-COLOR: #ffffff; SCROLLBAR-3DLIGHT-COLOR: #ffffff">
링크 타겟변환 테스트
<br>
<a href="http://search.naver.com/search.naver?where=nexearch&query=phpschool&sm=top_hty&fbm=1">http://se.naver.com</A>
<br>
<a Href="http://se.naver.com">http://se.naver.com</A>
<br>
<A HrEf ="http://se.naver.com">http://se.naver.com</A>
<br>
<A href = "http://se.naver.com">http://se.naver.com</A>
<br>
<A href= "http://naver.com">http://naver.com</A>
<br>
<A href=http://se.naver.com>http://se.naver.com</A>
<br>
<A href = "http://se.naver.com" target=_self>SE 네이버 target self</A>
<br>
<A href="http://se.naver.com" target=_blank>SE 네이버 target blank</A>
<br>
</BODY>
</textarea>
</BODY>
</HTML>
아이프레임에 문서를 자스를 통해서 불러오는데요.
target를 변경하는 소스에요.
<HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--
window.onload = convertUrlLink;
function $(o){ return document.getElementById(o); }
function convertUrlLink(){
var obj = $("TextArea1");
var rUrlRegex = /((<a href=)*(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\wㄱ-ㅎㅏ-ㅣ가-힣\;\- \.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])"?)(>)/gi
var rTarget = " target='_blank'\>";
obj.value = obj['value']['replace'](rUrlRegex, "$1" + rTarget);
}
//-->
</SCRIPT>
<BODY>
<textarea id="TextArea1" cols="520" rows="25">
<BODY style="SCROLLBAR-ARROW-COLOR: #d2e5f4; SCROLLBAR-FACE-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #9ebfe8; FONT-FAMILY: gulim; SCROLLBAR-HIGHLIGHT-COLOR: #d2e5f4; SCROLLBAR-SHADOW-COLOR: #d2e5f4; FONT-SIZE: 10pt; SCROLLBAR-TRACK-COLOR: #ffffff; SCROLLBAR-3DLIGHT-COLOR: #ffffff">
링크 타겟변환 테스트
<br>
<a href="http://search.naver.com/search.naver?where=nexearch&query=phpschool&sm=top_hty&fbm=1">http://se.naver.com</A>
<br>
<a Href="http://se.naver.com">http://se.naver.com</A>
<br>
<A HrEf ="http://se.naver.com">http://se.naver.com</A>
<br>
<A href = "http://se.naver.com">http://se.naver.com</A>
<br>
<A href= "http://naver.com">http://naver.com</A>
<br>
<A href=http://se.naver.com>http://se.naver.com</A>
<br>
<A href = "http://se.naver.com" target=_self>SE 네이버 target self</A>
<br>
<A href="http://se.naver.com" target=_blank>SE 네이버 target blank</A>
<br>
</BODY>
</textarea>
</BODY>
</HTML>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6430 | 12년 전 | 985 | ||
| 6429 | 12년 전 | 9109 | ||
| 6428 | 12년 전 | 607 | ||
| 6427 |
제이티37
|
12년 전 | 1572 | |
| 6426 |
프로프리랜서
|
12년 전 | 1159 | |
| 6425 |
프로프리랜서
|
12년 전 | 1612 | |
| 6424 |
프로프리랜서
|
12년 전 | 1817 | |
| 6423 | 12년 전 | 1006 | ||
| 6422 |
퍼블리셔지노군
|
12년 전 | 1579 | |
| 6421 | 12년 전 | 2212 | ||
| 6420 |
|
12년 전 | 1336 | |
| 6419 |
|
12년 전 | 1288 | |
| 6418 | 12년 전 | 1187 | ||
| 6417 |
senseme
|
12년 전 | 7433 | |
| 6416 |
senseme
|
12년 전 | 1333 | |
| 6415 |
senseme
|
12년 전 | 1194 | |
| 6414 |
senseme
|
12년 전 | 1971 | |
| 6413 |
senseme
|
12년 전 | 978 | |
| 6412 |
senseme
|
12년 전 | 1494 | |
| 6411 |
senseme
|
12년 전 | 1106 | |
| 6410 |
senseme
|
12년 전 | 1050 | |
| 6409 |
PASKRAN
|
12년 전 | 2821 | |
| 6408 | 12년 전 | 10806 | ||
| 6407 | 12년 전 | 2995 | ||
| 6406 |
프로프리랜서
|
12년 전 | 2840 | |
| 6405 |
프로프리랜서
|
12년 전 | 1378 | |
| 6404 |
프로프리랜서
|
12년 전 | 2727 | |
| 6403 |
프로프리랜서
|
12년 전 | 824 | |
| 6402 |
프로프리랜서
|
12년 전 | 1739 | |
| 6401 |
프로프리랜서
|
12년 전 | 1144 | |
| 6400 |
프로프리랜서
|
12년 전 | 1475 | |
| 6399 |
프로프리랜서
|
12년 전 | 1185 | |
| 6398 |
프로프리랜서
|
12년 전 | 1496 | |
| 6397 |
프로프리랜서
|
12년 전 | 3607 | |
| 6396 | 12년 전 | 1876 | ||
| 6395 | 12년 전 | 924 | ||
| 6394 |
|
12년 전 | 5242 | |
| 6393 |
제이티37
|
12년 전 | 1207 | |
| 6392 |
songsinica
|
12년 전 | 1215 | |
| 6391 |
|
12년 전 | 3398 | |
| 6390 |
|
12년 전 | 1629 | |
| 6389 | 12년 전 | 4861 | ||
| 6388 |
스누피사랑
|
12년 전 | 5434 | |
| 6387 | 12년 전 | 1839 | ||
| 6386 | 12년 전 | 3064 | ||
| 6385 |
희망과열정
|
12년 전 | 930 | |
| 6384 | 12년 전 | 3295 | ||
| 6383 | 12년 전 | 10602 | ||
| 6382 |
|
12년 전 | 5791 | |
| 6381 |
SugarSkull
|
12년 전 | 1032 | |
| 6380 | 12년 전 | 784 | ||
| 6379 |
|
12년 전 | 1985 | |
| 6378 | 12년 전 | 1567 | ||
| 6377 | 12년 전 | 502 | ||
| 6376 |
후라보노보노
|
12년 전 | 1336 | |
| 6375 | 12년 전 | 2875 | ||
| 6374 | 12년 전 | 842 | ||
| 6373 | 12년 전 | 2372 | ||
| 6372 |
takumi22
|
12년 전 | 1243 | |
| 6371 |
개초보제이
|
12년 전 | 779 | |
| 6370 |
고급자가되고
|
12년 전 | 1464 | |
| 6369 | 12년 전 | 891 | ||
| 6368 | 12년 전 | 3189 | ||
| 6367 | 12년 전 | 1884 | ||
| 6366 | 12년 전 | 2886 | ||
| 6365 |
lilyosia
|
12년 전 | 1801 | |
| 6364 | 12년 전 | 1063 | ||
| 6363 | 12년 전 | 1596 | ||
| 6362 | 12년 전 | 2742 | ||
| 6361 | 12년 전 | 2566 | ||
| 6360 | 12년 전 | 1011 | ||
| 6359 | 12년 전 | 2105 | ||
| 6358 |
|
12년 전 | 1795 | |
| 6357 |
에헤라디야자진방아를돌려라
|
12년 전 | 790 | |
| 6356 | 12년 전 | 2093 | ||
| 6355 | 12년 전 | 3789 | ||
| 6354 | 12년 전 | 3104 | ||
| 6353 | 12년 전 | 1548 | ||
| 6352 | 12년 전 | 7772 | ||
| 6351 | 12년 전 | 2540 | ||
| 6350 | 12년 전 | 2802 | ||
| 6349 | 12년 전 | 1882 | ||
| 6348 | 12년 전 | 3551 | ||
| 6347 | 12년 전 | 1453 | ||
| 6346 | 12년 전 | 1197 | ||
| 6345 | 12년 전 | 1835 | ||
| 6344 | 12년 전 | 1417 | ||
| 6343 |
프로프리랜서
|
12년 전 | 2061 | |
| 6342 |
프로프리랜서
|
12년 전 | 1391 | |
| 6341 |
프로프리랜서
|
12년 전 | 1814 | |
| 6340 |
프로프리랜서
|
12년 전 | 1909 | |
| 6339 |
프로프리랜서
|
12년 전 | 1353 | |
| 6338 |
프로프리랜서
|
12년 전 | 1619 | |
| 6337 | 12년 전 | 5280 | ||
| 6336 |
프로프리랜서
|
12년 전 | 1635 | |
| 6335 |
프로프리랜서
|
12년 전 | 953 | |
| 6334 |
프로프리랜서
|
12년 전 | 1335 | |
| 6333 |
프로프리랜서
|
12년 전 | 2444 | |
| 6332 | 12년 전 | 1104 | ||
| 6331 |
돗단배123
|
12년 전 | 1423 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기