您的位置:首页 > Web前端 > JavaScript

JSONP

2015-07-30 17:16 549 查看
通过script传递json对象

<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<script>
function animalSays1(type,sound){
alert(type+" says1 "+ sound);
}
function animalSays2(animal){
alert(animal.type+" says2 "+ animal.sound);
}
</script>
<script src="http://mis..com/mis/js/includes-extjs/officeSupply/officeSupply_goods.js"></script>
<script src="http://ip/qyweixin/assets/js/test.js?callback=animalSays2"></script>
<title>JSONP学习</title>
<script>
</script>
</head>
<body>
<form name="form1">
<input id="peroidid" type="text">
<input id="supid" type="text">
</form>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: