网页端和移动端分开写了,如何能实现连接

网页移动端和网页端分别各写了一个html和一个css文件,现在想让两个文件合并,实现在一个网页上既能实现网页端也能实现移动端怎么办

二级域名,重定向

可以写一个方法来判断是否为手机、电脑登陆,如常用的iphone和android

var is_mobile = navigator.userAgent.toLowerCase().match(/(iphone|android)/i) != null;
if (is_mobile) {
    document.write(css)
} else {
   document.write(css)
}

可以在你的PC端html判断,是mobile就跳转到mobile页面