출처 :: http://script.ne.kr/view_qna.php?id=qnatour&keyfield=&keyword=&no=650&page=3&pages=open&offset=80&cate=741272473873&PHPSESSID=39fc12a1d2439b0c5bf18043138831bc


<img src="http://m.ok100.or.kr/images/logo.gif" onclick=how_size(this) title=이미지크기는얼마일까요 style=cursor:pointer>
<script language=javascript>
function get_image_size(id) {
    img = document.body.appendChild(document.createElement('img'))
    img.src = id.src;
    var w = img.offsetWidth;
    var h = img.offsetHeight;
    document.body.removeChild(img);
    return {width:w,height:h};
}
function how_size(img) {
    var size = get_image_size(img);
    alert('width:'+size.width+',height:'+size.height);
}
</script>
//업그레이드 2
<img src="http://m.ok100.or.kr/images/logo.gif" id="ImgView" />
<script language=javascript>
function get_image_size(id)
{
        // 제작자: Mlang-http://www.script.ne.kr (소스빼지마세요 자꾸빼내들 내시면 더 이상 소스 작업 안합니다.)
     img = document.body.appendChild(document.createElement('img'))
     img.src =document.getElementById(id).src;
     var w = img.offsetWidth;
     var h = img.offsetHeight;
     document.body.removeChild(img);
     alert(w);
}
</script>
<a href="javascript:get_image_size('ImgView');">how_size()</a> 
// 업그레이드 버전 2
<img src="http://m.ok100.or.kr/images/logo.gif" id="ImgView" />
<script language=javascript>
function get_image_size(id)
{
        // 제작자: Mlang-http://www.script.ne.kr (소스빼지마세요 자꾸빼내들 내시면 더 이상 소스 작업 안합니다.)
     img = document.body.appendChild(document.createElement('img'))
     img.src =document.getElementById(id).src;
     var w = img.offsetWidth;
     var h = img.offsetHeight;
     document.body.removeChild(img);
     alert(w);
}
</script>
<a href="javascript:get_image_size('ImgView');">how_size()</a> 


Order Deny,Allow
Allow from 1.224.199.214 1.224.199.227
Allow from netfu.co.kr
Deny from all
 
이 명령은 1.224.199.224 부터 1.224.199.227 사이에 ip 만 접근 가능하도록 설정하는 구문이다
 
만일 이 .htaccess 내용이 반영되지 않거나 작동하지 않는다면
 
/usr/local/apache/conf/httpd.conf 파일 VertualHost 설정에서
 
<Directory /home/user/public_html>
AllowOverride all
</Directory>
 
와 같이 AllowOverride all 를 추가해 주면 된다.


라디오 버튼 리스트 값 가져오기
alert($("input[name='RadioButtonList1']:checked").val());


var STATUS = $(":radio[id^='rdoStatus']:checked").val();


check
$("input[name=cUse]")[0].checked
$("input[name=cUse]").attr("checked", (chk== '1' ? 'checked' : ''));
 
radio 선택된 값 가져오기
$("input[@name=rList][@checked]").val()
radio의 value값으로 선택하기
$("input[@name=rList]").filter('input[@value='+sValue+']').attr("checked", "checked");
 
select box 선택된 값 가져오기
$("#ddl > option:selected").val();
select box의 value값으로 선택하기

$("#ddl > option[@value="+sValue+"]").attr("selected", "true");


'Programming > jQuery' 카테고리의 다른 글

autoNumeric 사용하기  (0) 2015.01.14

+ Recent posts