在javaScript中调用wcf服务的问题 [英] Problem in calling wcf Service in javaScript
问题描述
我成功创建了wcf并收到了此消息
您已成功创建服务
I created wcf successfully and got this message
that you have created service successfully
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
i尝试使用它kendui
$(文档).ready(function(){
$(#products)。kendoComboBox({
占位符:选择国家,
dataTextField:ProductName,
dataValueField:ProductID,
filter:contains,
autoBind:false,
minLength:3,
dataSource:{
类型:'odata',
serverFiltering :true,
运输:{
读取:{
url:http:// localhost:4398 / MyFirstService.svc / getdata ,
}
}
}
});
});
< br $> b $ b或jquery
i tried to used it kendui
$(document).ready(function() {
$("#products").kendoComboBox({
placeholder: "Select Country",
dataTextField: "ProductName",
dataValueField: "ProductID",
filter: "contains",
autoBind: false,
minLength: 3,
dataSource : {
type: 'odata',
serverFiltering: true,
transport: {
read: {
url: "http://localhost:4398/MyFirstService.svc/getdata",
}
}
}
});
});
or jquery
<h1>jQuery Tokeninput Demos</h1>
<h2>Simple Server-Backed Search</h2>
<div>
<input type="text" id="demo-input" name="blah" />
<input type="button" value="Submit" />
<script type="text/javascript">
$(document).ready(function() {
$("#demo-input").tokenInput("http://localhost:4398/MyFirstService.svc/json/getdata");
});
</script>
</div>
它不起作用我不喜欢不知道是什么问题
帮助请
it is not working and i don't know what is the matter
help please
推荐答案
(文件).ready(function(){
(document).ready(function() {
(#products)。kendoComboBox({
占位符:选择国家,
dataTextField:ProductName,
dataValueField:ProductID,
过滤器:包含,
autoBind:false,
minLength:3,
dataSource:{
类型:'odata',
serverFiltering:true,
运输:{
读取:{
url: http:// localhost:4398 / MyFirstService.svc / getdata,
}
}
}
});
});
或jquery
("#products").kendoComboBox({
placeholder: "Select Country",
dataTextField: "ProductName",
dataValueField: "ProductID",
filter: "contains",
autoBind: false,
minLength: 3,
dataSource : {
type: 'odata',
serverFiltering: true,
transport: {
read: {
url: "http://localhost:4398/MyFirstService.svc/getdata",
}
}
}
});
});
or jquery
<h1>jQuery Tokeninput Demos</h1>
<h2>Simple Server-Backed Search</h2>
<div>
<input type="text" id="demo-input" name="blah" />
<input type="button" value="Submit" />
<script type="text/javascript">
(document).ready(function(){
(document).ready(function() {
这篇关于在javaScript中调用wcf服务的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!