{"id":466,"date":"2023-02-17T06:28:17","date_gmt":"2023-02-16T22:28:17","guid":{"rendered":"http:\/\/blog.yuekegu.com\/?p=466"},"modified":"2023-02-17T06:28:17","modified_gmt":"2023-02-16T22:28:17","slug":"%e6%ad%a3%e5%88%99%e6%8f%90%e5%8f%96%e8%a6%81%e9%80%89%e6%8b%a9%e9%a2%98%e7%9a%84%e9%80%89%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/book.yuekegu.com\/index.php\/2023\/02\/17\/%e6%ad%a3%e5%88%99%e6%8f%90%e5%8f%96%e8%a6%81%e9%80%89%e6%8b%a9%e9%a2%98%e7%9a%84%e9%80%89%e9%a1%b9\/","title":{"rendered":"\u6b63\u5219\u63d0\u53d6\u8981\u9009\u62e9\u9898\u7684\u9009\u9879"},"content":{"rendered":"\n<p>\u5982\u4e0b\u9898\u5339\u914d\u9009\u9879\uff1a<\/p>\n\n\n\n<p>(1) \u8bbe\u96c6\u5408 $A=[-1,2], B=\\left{y \\mid y=x^{2}, x \\in A\\right}$, \u5219 $A\\cap B=$<br> A. $[1,4]$<br> B. $[1,2]$<br> C. $[-1,0]$<br> D. $[0,2]$<\/p>\n\n\n\n<p>\u76f4\u63a5\u4e0a\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    function getOption(str,from,to)\n    {\n        var r = 'var reg = \/[\\(]*'+from+'[:|\uff1a|\u3001|.]{1}(.*?)[\\s]?'+ to +'\/';\n        \/\/ console.log(r);\n        eval(r);\n        var arr = str.match(reg);\n        console.log(arr);\n        return arr[1].replace('&lt;br\/>','').replace('&lt;\/p>&lt;p style=\\\"white-space: normal;\\\">','');\n        \/\/return str.match(reg)[1];\n    }<\/code><\/pre>\n\n\n\n<p>\u683c\u5f0f\u5316\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    function formatContent(content)\n    {\n        content = content.replace('\\(A\\)','A.').replace('\\(B\\)','B.').replace('\\(C\\)','C.').replace('\\(D\\)','D.').replace('\\(E\\)','E.').replace('\\(F\\)','F.'); \n        content = content.replace('&lt;br\/>','');\n        content = content.replace('&lt;br>','');\n        content = content.replace('&lt;\/p>&lt;p>'); \n        content = content.replace('&lt;x','\\\\lt x');\n\n        return content;    \n    }<\/code><\/pre>\n\n\n\n<p>\u8bbe\u7f6e\u9009\u9879\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    function setChoiceItem()\n    {\n        var list =['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'];\n        var ue = UE.geEditor('question-content');\n        var content = formatContent(ue.getContent());\n        console.log(content);\n        var str = content;\n\n        \/\/console.log(getOption(str,'A','B'));\n        \/\/console.log(getOption(str,'B','C'));\n        \/\/console.log(getOption(str,'C','D'));\n        \/\/console.log(getOption(str,'D','$'));\n\n        \/\/$('p.optionContent:eq(0)').html(getOption(content,'A','B'));\n        \/\/$('p.optionContent:eq(1)').html(getOption(content,'B','C'));\n        \/\/$('p.optionContent:eq(2)').html(getOption(content,'C','D'));\n        \/\/$('p.optionContent:eq(3)').html(getOption(content,'D','$'));\n        \n        var len = $('p.optionContent').length; \n\n        $('p.optionContent').each(function(index,e){\n\n            console.log(list[index]);console.log(len);\n\n            var start = list[index];\n            var end = list[index+1];\n            if(index == len-1) \n            {\n                end='$';\n            }\n\n            $(this).html(getOption(content,start,end));\n\n        });\n\n    }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4e0b\u9898\u5339\u914d\u9009\u9879\uff1a (1) \u8bbe\u96c6\u5408 $A=[-1,2], B=\\left{y \\mid y=x^{2}, x \\in A\\right}$, \u5219 $A\\cap B=$ A. $[1,4]$ B. $[1,2]$ C. $[-1,0]$ D. $[0,2]$ \u76f4\u63a5\u4e0a\u4ee3\u7801\uff1a \u683c\u5f0f\u5316\u6570\u636e\uff1a \u8bbe\u7f6e\u9009\u9879\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-466","post","type-post","status-publish","format-standard","hentry","category-psychology"],"_links":{"self":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/comments?post=466"}],"version-history":[{"count":0,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"wp:attachment":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}