jquery(三)jQuery DOM 操作 取值 賦值

獲得內容 - text()、html() 以及 val() text() - 設置或返回所選元素的文本內容 html() - 設置或返回所選元素的內容(包括 HTML 標記) val() - 設置或返回表單字段的值 $("#btn1").click(function(){ alert("Text: " + $("#test").text()); }); $("#btn2").click(fun
相關文章
相關標籤/搜索