一、请写出导入导出的所有方式
第一种
import {userName,age} from "./day28.js"
第二种
import {userName as aaa} from "./day28.js"
第三种
import abc from "./day28.js"
第四种
import * as abc from "./day28.js"
第一种
export {userName,age}
第二种
export {userName as names}
第三种
export default userName;
2、请使用jq通过get和post调用接口http://index.com数据并接收,get和post传id=99
示例:
$.get("http://http://index.com",{id=99},function(data,status){
console.log(data);
});
$.post("http://index.com",{
"id":99
},function(data,status){
console.log(data);
});