{"id":1777,"date":"2023-08-03T15:48:09","date_gmt":"2023-08-03T07:48:09","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=1777"},"modified":"2023-08-03T15:48:09","modified_gmt":"2023-08-03T07:48:09","slug":"h5%e6%89%93%e5%8c%85windows%e8%bd%af%e4%bb%b6%e6%8e%a8%e8%8d%90%e4%bd%bf%e7%94%a8%e4%b8%80%e9%97%a8%e6%89%93%e5%8c%85%e5%b9%b3%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/1777\/","title":{"rendered":"h5\u6253\u5305windows\u8f6f\u4ef6\u63a8\u8350\u4f7f\u7528\u4e00\u95e8\u6253\u5305\u5e73\u53f0"},"content":{"rendered":"

H5\u662f\u4e00\u79cd\u57fa\u4e8e\u7f51\u9875\u6280\u672f\u7684\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u7b49\u6280\u672f\u6765\u5f00\u53d1\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u79fb\u52a8\u5e94\u7528\u5e02\u573a\u4e2d\uff0cH5\u5e94\u7528\u7a0b\u5e8f\u5df2\u7ecf\u6210\u4e3a\u4e00\u79cd\u975e\u5e38\u6d41\u884c\u7684\u5e94\u7528\u5f00\u53d1\u65b9\u5f0f\u3002\u4f46\u662f\uff0cH5\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u9700\u8981\u901a\u8fc7\u6d4f\u89c8\u5668\u6765\u5b9e\u73b0\uff0c\u8fd9\u5bf9\u4e8e\u7528\u6237\u6765\u8bf4\u5e76\u4e0d\u662f\u5f88\u65b9\u4fbf\u3002\u56e0\u6b64\uff0c\u5c06H5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u662f\u4e00\u4e2a\u975e\u5e38\u597d\u7684\u9009\u62e9\u3002\u672c\u6587\u5c06\u4ecb\u7ecdH5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210Windows\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n

\u4e00\u3001\u539f\u7406<\/p>\n

H5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210Windows\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u7684\u539f\u7406\u662f\u5c06H5\u5e94\u7528\u7a0b\u5e8f\u5c01\u88c5\u5230\u4e00\u4e2a\u672c\u5730\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e2a\u6d4f\u89c8\u5668\u5185\u6838\u6765\u8fd0\u884cH5\u5e94\u7528\u7a0b\u5e8f\u3002\u5728Windows\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528WinJS\u5e93\u6765\u8bbf\u95ee\u672c\u5730\u8d44\u6e90\u548c\u8bbe\u5907\u529f\u80fd\uff0c\u4ee5\u53ca\u4f7f\u7528JavaScript\u6765\u64cd\u4f5c\u5e94\u7528\u7a0b\u5e8f\u7684\u754c\u9762\u53ef\u4ee5\u5f00\u53d1\u8f6f\u4ef6\u7684\u8f6f\u4ef6<\/a>\u3002<\/p>\n

\u4e8c\u3001\u6b65\u9aa4<\/p>\n

\u4e0b\u9762\u662f\u5c06H5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210Windows\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u7684\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n

1. \u51c6\u5907\u5f00\u53d1\u73af\u5883<\/p>\n

\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5Visual Studio\u548c\u76f8\u5173\u7684\u5f00\u53d1\u5de5\u5177\u3002Visual Studio\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u5f00\u53d1\u5404\u79cd\u7c7b\u578b\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u5b89\u88c5Visual Studio\u65f6\uff0c\u9700\u8981\u9009\u62e9\u201cUniversal Windows Platform development\u201d\u548c\u201cHTML\/JavaScript\u201d\u9009\u9879\u3002<\/p>\n

2. \u521b\u5efa\u65b0\u9879\u76ee<\/p>\n

\u6253\u5f00Visual Studio\uff0c\u9009\u62e9\u201cFile\u201d->\u201cNew\u201d->\u201cProject\u201d\uff0c\u5728\u201cNew Project\u201d\u5bf9\u8bdd\u6846\u4e2d\u9009\u62e9\u201cJavaScript\u201d->\u201cWindows\u201d->\u201cUniversal\u201d->\u201cBlank App (Universal Windows)\u201d\u6a21\u677f\uff0c\u7136\u540e\u8f93\u5165\u9879\u76ee\u540d\u79f0\u548c\u4fdd\u5b58\u8def\u5f84\uff0c\u70b9\u51fb\u201cOK\u201d\u6309\u94ae\u5373\u53ef\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u3002<\/p>\n

3. \u6dfb\u52a0H5\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u5728\u65b0\u5efa\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cwww\u201d\u7684\u6587\u4ef6\u5939\uff0c\u5c06H5\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u6587\u4ef6\u590d\u5236\u5230\u8be5\u6587\u4ef6\u5939\u4e2d\u3002\u7136\u540e\uff0c\u5728Visual Studio\u4e2d\u53f3\u952e\u5355\u51fb\u9879\u76ee\u540d\u79f0\uff0c\u9009\u62e9\u201cAdd\u201d->\u201cExisting Item\u201d\uff0c\u5c06www\u6587\u4ef6\u5939\u6dfb\u52a0\u5230\u9879\u76ee\u4e2d\u3002<\/p>\n

4. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n

\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u627e\u5230\u201cpackage.appxmanifest\u201d\u6587\u4ef6\uff0c\u53cc\u51fb\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u9009\u62e9\u201cApplication\u201d\u9009\u9879\u5361\uff0c\u5728\u201cStart page\u201d\u4e2d\u8f93\u5165H5\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u9875\u5730\u5740\uff0c\u4f8b\u5982\u201cwww\/index.html\u201d\u3002<\/p>\n

5. \u7f16\u8bd1\u548c\u6253\u5305<\/p>\n

\u5728Visual Studio\u4e2d\u9009\u62e9\u201cBuild\u201d->\u201cRebuild Solution\u201d\u6765\u7f16\u8bd1\u9879\u76ee\uff0c\u7136\u540e\u9009\u62e9\u201cProject\u201d->\u201cStore\u201d->\u201cCreate App Packages\u201d\u6765\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u6253\u5305\u8fc7html5\u8f6cexe<\/a>\u7a0b\u4e2d\uff0c\u9700\u8981\u9009\u62e9\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\u3001\u8bed\u8a00\u3001CPU\u67b6\u6784\u7b49\u4fe1\u606f\uff0c\u7136\u540e\u9009\u62e9\u201cCreate\u201d\u6309\u94ae\u6765\u751f\u6210\u5b89\u88c5\u5305\u3002<\/p>\n

6. \u5b89\u88c5\u548c\u6d4b\u8bd5<\/p>\n

\u5728\u6253\u5305\u5b8c\u6210\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a\u5b89\u88c5\u5305\uff0c\u53ef\u4ee5\u5c06\u8be5\u5b89\u88c5\u5305\u590d\u5236\u5230Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u8fdb\u884c\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u5e94\u7528\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u770b\u5230H5\u5e94\u7528\u7a0b\u5e8f\u5df2\u7ecf\u88ab\u5c01\u88c5\u5230\u672c\u5730\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u5185\u6838\u6765\u8fd0\u884cH5\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

\u603b\u7ed3<\/p>\n

\u5c06H5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210Windows\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u8ba9\u7528\u6237\u66f4\u65b9\u4fbf\u5730\u4f7f\u7528\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e14\u53ef\u4ee5\u4f7f\u7528WinJS\u5e93\u6765\u8bbf\u95ee\u672c\u5730\u8d44\u6e90\u548c\u8bbe\u5907\u529f\u80fd\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5c06H5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210Windows\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6<\/p>\n

<\/figure>\n<\/p>\n

\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

H5\u662f\u4e00\u79cd\u57fa\u4e8e\u7f51\u9875\u6280\u672f\u7684\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u7b49\u6280\u672f\u6765\u5f00\u53d1\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u79fb\u52a8\u5e94\u7528\u5e02\u573a\u4e2d\uff0cH5\u5e94\u7528\u7a0b\u5e8f\u5df2\u7ecf\u6210\u4e3a\u4e00\u79cd\u975e\u5e38\u6d41\u884c\u7684\u5e94\u7528\u5f00\u53d1\u65b9\u5f0f\u3002\u4f46\u662f\uff0cH5\u5e94\u7528\u7a0b\u5e8f<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[3809,3810,12,3048,23],"topic":[],"class_list":["post-1777","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-macos","tag-exe","tag-12","tag-3048","tag-23"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/1777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=1777"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/1777\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=1777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=1777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=1777"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=1777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}