0
我想调用一个具有JavaScript的Json输出的web服务。但我无法获得价值。我尝试了不同的方法,但没有成功。请帮忙 !!从web服务调用javascript
这里是我试过
<script src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
function callajax(){
var html =$.ajax({
cache: false,
type: "GET",
async: false,`enter code here`
data: {},
url: "http://domain/abc.php?param=abcd',
contentType: "application/json; charset=utf-8",
dataType: "json",
crossDomain: true,
Success: SucceedFunc,`enter code here`
error: function (request, errorText, errorCode)
{
alert(errorText+"--"+errorCode);
}
});
}
function SucceedFunc(data, status)
{
alert("Enter into Success");
alert(data);
}
代码
所需的输出是{ “名”:亚历克斯, “成功”:真正}格式。 我需要为“名称”选择值。
帮助将不胜感激。
感谢您的快速回复瑞安 我现在试着用 即使在那时我面临同样的问题。 我希望我遵循正确的方式。 – sattawar