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