JQUERY val()取不到值
$(function(){$("#city").change(function(){varcity=$(this).val();alert(city);});})City...
$(function(){ $("#city").change(function(){ var city = $(this).val(); alert(city); });})City: <select id="city"> <option value="">请选择...</option> <c:forEach items="${locations }" var="location"> <option value="${location.locationId }">${location.city }</option> </c:forEach></select>
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询