{"id":2333,"date":"2024-11-10T15:12:33","date_gmt":"2024-11-10T07:12:33","guid":{"rendered":"https:\/\/fwq.ai\/blog\/2333\/"},"modified":"2024-11-10T15:12:33","modified_gmt":"2024-11-10T07:12:33","slug":"layer-js%e5%bc%b9%e6%a1%86%e5%86%85%e5%a6%82%e4%bd%95%e8%b0%83%e7%94%a8javascript%e6%96%b9%e6%b3%95%e5%b9%b6%e4%bc%a0%e9%80%92%e5%8f%82%e6%95%b0%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/2333\/","title":{"rendered":"Layer.js\u5f39\u6846\u5185\u5982\u4f55\u8c03\u7528JavaScript\u65b9\u6cd5\u5e76\u4f20\u9012\u53c2\u6570\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173071606089339.jpg\" class=\"aligncenter\" title=\"Layer.js\u5f39\u6846\u5185\u5982\u4f55\u8c03\u7528JavaScript\u65b9\u6cd5\u5e76\u4f20\u9012\u53c2\u6570\uff1f\u63d2\u56fe\" alt=\"Layer.js\u5f39\u6846\u5185\u5982\u4f55\u8c03\u7528JavaScript\u65b9\u6cd5\u5e76\u4f20\u9012\u53c2\u6570\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>layer.js\u8c03\u7528\u5f39\u51fa\u6846\u5185\u7684javascript\u65b9\u6cd5<\/strong><\/p>\n<p>\u5728\u9879\u76ee\u4e2d\u4f7f\u7528layer.js\u8c03\u7528\u5f39\u51fa\u6846\u65f6\uff0c\u9047\u5230\u4e86\u4f7f\u7528\u5f39\u51fa\u6846\u5185javascript\u65b9\u6cd5\u7684\u95ee\u9898\uff0c\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>function pop_cardsend() {\n    layer.open({\n        id: \"1\",\n        type: 2,\n        title: '\u6807\u9898',\n        shadeclose: true,\n        shade: 0.6,\n        anim: 0,\n        area: ['90%', '80%'],\n        content: 'if.aspx',\n        success: function (layero, index) {\n            var childbody = layer.getchildframe('body', index);\n            childbody.find('#nav_hiddn').hide();\n            childbody.find('#\u5f39\u51fa\u5c42\u5143\u7d20id').val($('#\u57fa\u5c42\u5143\u7d20id').val());\n            selectperson( $(\"#\u57fa\u5c42\u5143\u7d20id\").val());\n        }\n    });\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0cselectperson\u662f\u5f39\u51fa\u6846\u5185\u7684javascript\u65b9\u6cd5\uff0c\u5e0c\u671b\u5728\u6253\u5f00\u5f39\u51fa\u6846\u65f6\u4f7f\u7528\u57fa\u5c42\u5143\u7d20\u7684value\u503c\u4f5c\u4e3a\u53c2\u6570\u8fd0\u884c\u5b83\u3002\u95ee\u9898\u5728\u4e8e\uff0c\u8fd9\u6bb5\u4ee3\u7801\u4e2dselectperson\u65e0\u6548\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u8981\u5728\u6253\u5f00\u5f39\u51fa\u6846\u65f6\u4f7f\u7528\u57fa\u5c42\u5143\u7d20\u7684\u503c\u4f5c\u4e3a\u53c2\u6570\u8fd0\u884c\u5f39\u51fa\u6846\u5185\u7684javascript\u65b9\u6cd5\uff0c\u9700\u8981\u5728url\u4e0a\u6dfb\u52a0\u53c2\u6570\u3002\u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>function Pop_CardSend() {\n    layer.open({\n        id: \"1\",\n        type: 2,\n        title: '\u6807\u9898',\n        shadeClose: true,\n        shade: 0.6,\n        anim: 0,\n        area: ['90%', '80%'],\n        content: 'if.aspx?param=' + $(\"#\u57fa\u5c42\u5143\u7d20id\").val(),\n        success: function (layero, index) {\n            var Childbody = layer.getChildFrame('body', index);\n            Childbody.find('#nav_hiddn').hide();\n        }\n    });\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728\u5f39\u51fa\u6846\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7geturlparam(&#8216;param&#8217;)\u83b7\u53d6url\u4e0a\u7684\u53c2\u6570\u503c\uff0c\u518d\u5c06\u5b83\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9selectperson\u65b9\u6cd5\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fLayer.js\u5f39\u6846\u5185\u5982\u4f55\u8c03\u7528JavaScript\u65b9\u6cd5\u5e76\u4f20\u9012\u53c2\u6570\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>layer.js\u8c03\u7528\u5f39\u51fa\u6846\u5185\u7684javascript\u65b9\u6cd5 \u5728\u9879\u76ee\u4e2d\u4f7f\u7528layer.js\u8c03\u7528\u5f39\u51fa\u6846\u65f6\uff0c\u9047\u5230\u4e86\u4f7f\u7528\u5f39\u51fa\u6846\u5185javascript\u65b9\u6cd5\u7684\u95ee\u9898\uff0c\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff1a function pop_cardsend() { layer.open({ id: &#8220;1&#8221;, type: 2, title: &#8216;\u6807\u9898&#8217;, shadeclose: true, shade: 0.6, anim: 0, area: [&#8216;90%&#8217;, &#8216;80%&#8217;], content: &#8216;if.aspx&#8217;, success: function (layero, index) { var childbody = layer.getchildframe(&#8216;body&#8217;, index); childbody.find(&#8216;#nav_hiddn&#8217;).hide(); childbody.find(&#8216;#\u5f39\u51fa\u5c42\u5143\u7d20id&#8217;).val($(&#8216;#\u57fa\u5c42\u5143\u7d20id&#8217;).val()); selectperson( $(&#8220;#\u57fa\u5c42\u5143\u7d20id&#8221;).val()); } }); } \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0cselectperson\u662f\u5f39\u51fa\u6846\u5185\u7684javascript\u65b9\u6cd5\uff0c\u5e0c\u671b\u5728\u6253\u5f00\u5f39\u51fa\u6846\u65f6\u4f7f\u7528\u57fa\u5c42\u5143\u7d20\u7684value\u503c\u4f5c\u4e3a\u53c2\u6570\u8fd0\u884c\u5b83\u3002\u95ee\u9898\u5728\u4e8e\uff0c\u8fd9\u6bb5\u4ee3\u7801\u4e2dselectperson\u65e0\u6548\u3002 \u89e3\u51b3\u65b9\u6848 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u8981\u5728\u6253\u5f00\u5f39\u51fa\u6846\u65f6\u4f7f\u7528\u57fa\u5c42\u5143\u7d20\u7684\u503c\u4f5c\u4e3a\u53c2\u6570\u8fd0\u884c\u5f39\u51fa\u6846\u5185\u7684javascript\u65b9\u6cd5\uff0c\u9700\u8981\u5728url\u4e0a\u6dfb\u52a0\u53c2\u6570\u3002\u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a function Pop_CardSend() { layer.open({ id: &#8220;1&#8221;, type: 2, title: &#8216;\u6807\u9898&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2333","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=2333"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2333\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=2333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=2333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=2333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}