{"id":90,"date":"2018-07-15T16:14:39","date_gmt":"2018-07-15T08:14:39","guid":{"rendered":"https:\/\/103.249.111.182\/?p=90"},"modified":"2018-07-15T16:14:39","modified_gmt":"2018-07-15T08:14:39","slug":"%e8%bd%ac%e8%bd%bd%e7%ac%94%e8%ae%b0js-jquery-%e4%b9%8b-%e5%8f%96%e5%80%bc","status":"publish","type":"post","link":"https:\/\/7gugu.com\/index.php\/2018\/07\/15\/%e8%bd%ac%e8%bd%bd%e7%ac%94%e8%ae%b0js-jquery-%e4%b9%8b-%e5%8f%96%e5%80%bc\/","title":{"rendered":"[\u8f6c\u8f7d][\u7b14\u8bb0]js (jQuery) \u4e4b \u53d6\u503c"},"content":{"rendered":"<p><strong>1\uff1a \u6839\u636eclass \u3001 id\u00a0 \u53d6 input \u6807\u7b7e\u7684value \u503c \u3002<\/strong><br \/>\n<strong>jQuery\u00a0\u00a0\u00a0\u00a0 : $(&#8220;.className&#8221;).val();\u00a0 $(&#8220;#idName&#8221;).val();<\/strong><br \/>\n<strong>javaScript : document.getElementById(&#8220;idName&#8221;).value;<\/strong><\/p>\n<p><strong>2:\u00a0 \u6839\u636eclass \u3001id \u83b7\u53d6\u6807\u7b7e\u4e4b\u95f4\u7684\u5185\u5bb9\uff1a\u5982 &lt;span&gt; \u3001&lt;lable&gt; \u3001&lt;div&gt; \u3002<\/strong><br \/>\n<strong>jQuery\u00a0\u00a0\u00a0\u00a0 : $(&#8220;#idName&#8221;).html(); $(&#8220;.className&#8221;).html();<\/strong><br \/>\n<strong>javaScript : document.getElementById(&#8220;idName&#8221;).innerHTML ;<\/strong><\/p>\n<p><strong>3: \u83b7\u53d6&lt;select id=&#8217;selectId&#8217;&gt; &lt;option value=&#8217;selectValue&#8217;&gt;\u00a0 \u9009\u4e2d\u503c\uff1a<\/strong><br \/>\n<strong>jQuery\u00a0\u00a0\u00a0\u00a0 : $(&#8220;#selectId&#8221;).val();<\/strong><br \/>\n<strong>javaScript : document.getElementById(&#8220;selectId&#8221;).value;<\/strong><\/p>\n<p><strong>4: \u83b7\u53d6&lt;img &gt; \u7684 src \u5185\u5bb9 \uff1a<\/strong><br \/>\n<strong>jQuery\u00a0\u00a0\u00a0\u00a0 : $(&#8220;#imgId&#8221;)[0].src;<\/strong><br \/>\n<strong>javaScript : document.getElementById(&#8220;imgId&#8221;).src;<\/strong><\/p>\n<p><strong>5\uff1a\u5b50\u754c\u9762\u83b7\u53d6\u7236\u754c\u9762\u5143\u7d20\u5185\u5bb9\uff1a<\/strong><br \/>\n<strong>5.1 (\u6807\u7b7e\u95f4\u7684\u5185\u5bb9 \uff0c\u5982 &lt;span&gt; \u3001&lt;lable&gt; \u3001&lt;div&gt; )<\/strong><br \/>\n<strong>JavaScript \uff1a window.parent.document.getElementById(&#8220;currentPage&#8221;).innerHTML ;<\/strong><br \/>\n<strong>JQuery\u00a0\u00a0\u00a0\u00a0 \uff1a $(window.parent.document).find(&#8220;#IdName&#8221;).text();<\/strong><br \/>\n<strong>5.2 \uff08\u53d6 input \u6807\u7b7e\u7684value \u503c\uff09<\/strong><br \/>\n<strong>JavaScript \uff1a window.parent.document.getElementById(&#8220;currentPage&#8221;).value ;<\/strong><br \/>\n<strong>JQuery\u00a0\u00a0\u00a0\u00a0 \uff1a $(window.parent.document).find(&#8220;#IdName&#8221;).val();<\/strong><\/p>\n<p><strong>6\uff1a\u5b50\u754c\u9762\u63a7\u5236\u7236\u9875\u9762\u8df3\u8f6c\uff1a<\/strong><\/p>\n<p><strong>window.parent.location.href = \u201c*\u201d \uff1b<\/strong><\/p>\n<blockquote><p>\u8f6c\u8f7d\u81ea:https:\/\/blog.csdn.net\/u013092590\/article\/details\/51276330<\/p>\n<p>\u82e5\u9020\u6210\u4fb5\u6743,\u8bf7\u901f\u4e8e\u672c\u4eba\u8054\u7cfbowo<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>1\uff1a \u6839\u636eclass \u3001 id\u00a0 \u53d6 input \u6807\u7b7e\u7684value \u503c \u3002 jQuery\u00a0\u00a0\u00a0\u00a0 : $(&#038;# &hellip; <a href=\"https:\/\/7gugu.com\/index.php\/2018\/07\/15\/%e8%bd%ac%e8%bd%bd%e7%ac%94%e8%ae%b0js-jquery-%e4%b9%8b-%e5%8f%96%e5%80%bc\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c[\u8f6c\u8f7d][\u7b14\u8bb0]js (jQuery) \u4e4b \u53d6\u503c\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,13],"tags":[32,33],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-29","category-13","tag-code","tag-js"],"_links":{"self":[{"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":0,"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"wp:attachment":[{"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/7gugu.com\/index.php\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}