테스트 사이트 - 개발 중인 베타 버전입니다

계산기를 만들어야 하는데 나타나질 않습니다. 채택완료

Fin12 9년 전 조회 1,665

<script type="text/javascript">

$(document).ready(function(e){

var aa = $(".aaa");

var bb = $(".bbb");

 

var cc = aa * 5;

var dd = bb * 5;

 

$("#por_result").on("click", function(e){

alert(cc);

});

});

</script>

 

 

 

<span class="aaa"><? echo $view['wr_1'] ?></span> 

 

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

답변 2개

채택된 답변
+20 포인트
d
9년 전

var aa = $(".aaa").val();

var bb = $(".bbb").val();

이렇게하셔야할걸요???

이렇게될지모르겠네요

val은 value값인데요 

로그인 후 평가할 수 있습니다

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

SLOOP
9년 전

</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><script type="text/javascript"></p><p style="word-break: break-all; line-height: 25.2072px; font-size: 14.004px; font-family: 돋움, Dotum, sans-serif; color: rgb(72, 72, 72);"><span class="Apple-tab-span" style="white-space: pre;">	</span>$(document).ready(function(e){</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>$("#por_result").on("click", function(e){</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>var aa = $(".aaa").val();</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>var bb = $(".bbb").val();</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>var cc = aa * 5;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>var dd = bb * 5;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>alert(cc);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>});</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;">	</span>});</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"></script><span class="Apple-tab-span" style="white-space: pre;">	</span></p><p>

로그인 후 평가할 수 있습니다

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

답변을 작성하려면 로그인이 필요합니다.

로그인