티스토리 뷰
1. 태그에 사용자 정의 태그 추가
<input type="text" name="group_sns_reply_write" parent="<?=$idx?>" value="댓글 입력후 엔터키를 눌러주세요...">
2. 사용자 정의 속성값 호출하기
alert($("input[name=group_sns_reply_write]").attr("parent"));
or
$("button[name=groupJoin_btn]").click(function (data) {
var parentNo = $(this).attr("parent");
샘플
<?php
$query = "SELECT *
FROM time_line;";
$db->query($query);
while($row = $db->next_row())
{
$no = $row["no"];
$contents = $row["contents"];
echo $no;
?>
<div id="desc">
<table border="0" width="100%">
<tr>
<td valign="top" width="104"><img src="./images/mt_03.png" width="92" height="83"></td>
<td valign="top">
<p style="color:#48a2d9; margin-bottom:10px;">
Wolfss
<font style="font-size:10px;color:#a5a5a5;margin-left:25px;">2012.08.28 09:33</font>
</p>
<?=$contents?>
</td>
<td width="120" align="center">
<font style="color:#6d84b4;">좋아요(5)</font>
<font style="color:#6d84b4;margin-left:15px;">댓글(3)</font>
</td>
</tr>
</table>
</div>
<div id="reply_write">
<table border="0" width="100%">
<tr>
<td width="40">
<img src="./images/mt_47.png" width="30" height="30">
<p style="color:#48a2d9">anny</p>
</td>
<td>
<input type="text" name="reply" parent="<?=$no?>" style="width:100%;height:32px;">
</td>
</tr>
<tr>
<td align="center" colspan="2" height="32">
<img src="./images/mt_55.png">
<img src="./images/mt_55.png">
</td>
</tr>
</table>
</div>
<?}?>
//댓글 이벤트 생성
$("input[name=reply]").bind("keypress", function (event) {
if (event.which == 13) {
alert($(this).attr("parent"));
}
});
- Total
- Today
- Yesterday
- java web-mvc
- 문자 자르기
- 스프링 시큐리티(spring security)-http basic 인증
- await
- error-java
- java-개발 환경 설정하기
- 스프링 프레임워크(spring framework)
- java.sql
- jstl(java standard tag library)
- java 키워드 정리
- 스프링 프레임워크(spring framewordk)
- nl2br
- 표현 언어(expression language)
- 람다식(lambda expression)
- jstl(java standard tag library)-core
- 진수 변환
- In App Purchase
- React
- .submit()
- 메이븐(maven)
- docker
- 인텔리제이(intellij)
- MainActor
- REST API
- 특정 문자를 기준으로 자르기
- 스프링 시큐리티(spring security)
- System.Diagnostics
- system.io
- 제품 등록
- jsp 오픈 소스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |