一、val()、text()、html()方法
<script type="text/javascript"> ????????$(function(){ ??????????????$(msg).val():取值 ??????????????$(msg).val("hello"):设置值 ??????????????//val()主要针对于表单控件(value属性) ?????????????$(showMsg).text():取值 ?????????????$(showMsg).text("hello"):设置值 ?????????????//text()只能识别文本内容 ?????????????$(showMsg).html():取值 ?????????????$(showMsg).html("<h1>hello</h1>"):设置值 ?????????????//html()可以识别html代码 ??????????}); ?????</script>
JQuery-方法
原文地址:http://www.cnblogs.com/yuefeng123/p/7728003.html