Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何通过Javascript将参数发送到.asp文件?_Javascript_Asp.net - Fatal编程技术网

如何通过Javascript将参数发送到.asp文件?

如何通过Javascript将参数发送到.asp文件?,javascript,asp.net,Javascript,Asp.net,我想使用Javascript向.asp文件发送一个参数。请看这里: var paramZabs = 12.55; function sendValueNP1(idValueNP1){ //load the .asp file $.get('sps_com/sendNP01.asp', //this is the .asp file where the paramZabs has to be sended function(dataValueNP1) { var paramValueNP

我想使用Javascript向.asp文件发送一个参数。请看这里:

var paramZabs = 12.55;
function sendValueNP1(idValueNP1){ //load the .asp file 
$.get('sps_com/sendNP01.asp', //this is the .asp file where the paramZabs has to be sended
function(dataValueNP1) {
    var paramValueNP1 = $('#' + idValueNP1).html();
});
}
以及sendNP01.asp文件的内容:

<p id="NPSet_Z"><%WritePLC("CNCProgram.Zeropoint.Z"," here the paramZabs value ");%></p>

如何实现这一点?

有关使用jquery发送参数的信息:

//------edit---$.get-----
$.get('sps_com/sendNP01.asp', { parameter1: paramZabs} ).done(
function(dataValueNP1) {
    var paramValueNP1 = $('#' + idValueNP1).html();
});
//-----------------------

谢谢@Mohammadreza。.asp文件中的代码如下所示:或者,您可以在发送带有查询字符串的参数时获得: