标签:cti function text java jquer span html meta ges
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>访问设置元素内容</title> <script src="js/jquery.js"></script> <script type="text/javascript"> //页面加载完成简写形式 $(function(){ //设置内容 $("#div1").html("<b> hello word!</b>"); $("#div2").text("<b> hello word!</b>"); //获取内容 alert($("#div1").text()); //获取text的value值 $("#txt1").val("12312313131"); alert($("#txt1").val()); //利用数组一次性设置多个值 $("#mselect").val(["a","c"]); }) </script> </head> <body> <div id="div1"></div> <div id="div2"></div> <input type="text" id="txt1" /> <select id="mselect" multiple="multiple"> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> </select> </body> </html>
标签:cti function text java jquer span html meta ges
原文地址:http://www.cnblogs.com/whzym111/p/6066712.html