\r\n<...","url":"https://sir.kr/boards/pg_tip/15964","author":{"@type":"Person","name":"수다왕","url":"https://sir.kr/profile/1aba1084-a130-424e-be71-de9a958f6b3b"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"datePublished":"2017-10-24T23:39:11+09:00","dateModified":"2017-10-24T23:39:11+09:00"}

.innerWidth ()

· 8년 전 · 1811

.innerWidth ()

일치하는 요소 집합의 첫 번째 요소에 대해 현재 계산 된 내부 너비를 가져오고 (패딩을 포함하지만 테두리는 포함하지 않음) 일치하는 모든 요소의 내부 너비를 설정합니다.

예:
단락의 innerWidth를 돌려줍니다.


<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>innerWidth demo</title>
  <style>
  p {
    margin: 10px;
    padding: 5px;
    border: 2px solid #666;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
 
<p>Hello</p>
<p></p>
 
<script>
var p = $( "p:first" );
$( "p:last" ).text( "innerWidth:" + p.innerWidth() );
</script>
 
</body>
</html>

|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
jQuery 8년 전 조회 2,035
jQuery 8년 전 조회 2,104
jQuery 8년 전 조회 2,253
jQuery 8년 전 조회 2,403
jQuery 8년 전 조회 2,617
jQuery 8년 전 조회 2,847
jQuery 8년 전 조회 2,038
jQuery 8년 전 조회 3,018
jQuery 8년 전 조회 2,520
jQuery
[jQuery]
8년 전 조회 1,884
JavaScript 8년 전 조회 2,960
jQuery
[jQuery]
8년 전 조회 1,688
jQuery 8년 전 조회 1,925
jQuery 8년 전 조회 2,027
jQuery 8년 전 조회 1,812
jQuery 8년 전 조회 1,870
jQuery
[jQuery]
8년 전 조회 1,562
jQuery 8년 전 조회 2,173
jQuery 8년 전 조회 2,640
jQuery
[jQuery]
8년 전 조회 1,909
jQuery 8년 전 조회 1,596
jQuery
[jQuery]
8년 전 조회 2,054
jQuery 8년 전 조회 5,631
기타 8년 전 조회 3,385
jQuery
[jQuery]
8년 전 조회 1,758
jQuery 8년 전 조회 1,929
jQuery 8년 전 조회 2,038
PHP 8년 전 조회 5,362
node.js 8년 전 조회 4,367
jQuery 8년 전 조회 2,411