可以在经典的ASP应用程序中使用jQuery吗?

时间:2022-08-29 01:55:07

We have a large classic ASP application that we are rewriting into ASP.NET. We won't be finished with the rewrite, testing, etc until the end of next year. We're getting a lot of pressure to spruce up the interface of the classic ASP application in the meantime.

我们有一个很大的经典ASP应用程序,我们正在重写ASP.NET。直到明年年底,我们才会完成重写,测试等工作。在此期间,我们面临着很大的压力,要求改进经典ASP应用程序的界面。

Is it possible to use jQuery with classic ASP?

是否可以将jQuery与经典ASP一起使用?

9 个解决方案

#1


jQuery is a javascript framework and should in no way interfere with your classic ASP.

jQuery是一个javascript框架,不应该干扰你的经典ASP。

jQuery can be used on the client side but can only work with what it has available/can request.

jQuery可以在客户端使用,但只能使用它可用/可以请求的内容。

#2


I'm using Mootools on the server end as well as the client end, JScript ASP rocks! :)

我在服务器端和客户端使用Mootools,JScript ASP摇滚! :)

#3


Yes, it is. ASP simply pre-processes and outputs HTML, which can be manipulated through javascript. (Or jQuery)

是的。 ASP只是预处理和输出HTML,可以通过javascript操作。 (或jQuery)

#4


I don't see why not, jQuery is a client-side library built on top of JavaScript, what are you planning on doing with jQuery?

我不明白为什么不,jQuery是一个基于JavaScript构建的客户端库,你打算用jQuery做什么?

#5


jQuery can be used in any web application. Also in your static HTML pages.

jQuery可以在任何Web应用程序中使用。也在您的静态HTML页面中。

It is basically a client side javascript framework which helps you in manipulating the DOM and many other functions.

它基本上是一个客户端javascript框架,可以帮助您操作DOM和许多其他功能。

#6


I couldnt believe somebody asked this question :) ... with all respect.

我无法相信有人问过这个问题:) ......我非常尊重。

Remember, PHP, ASP, ASP.NET, ASP.NET MVC, CGI.... at the end, they render HTML code back to the client aka browser. this has to "read" this code and do the magic of displaying it on the screen.

请记住,PHP,ASP,ASP.NET,ASP.NET MVC,CGI ....最后,他们将HTML代码渲染回客户端即浏览器。这必须“读取”这段代码,并在屏幕上显示它。

Javascript is a "browser side" aka client-side language that is used to manipulate "browser side" objects (DOM). Javascript has been a nightmare for most web developers because browsers don't "read" it the same way. Thanks god Netscape is almost gone forever because it was one of the worst to deal with.

Javascript是一种“浏览器端”,也就是客户端语言,用于操纵“浏览器端”对象(DOM)。 Javascript一直是大多数Web开发人员的噩梦,因为浏览器不会以相同的方式“读取”它。感谢神Netscape几乎永远消失,因为它是最糟糕的处理之一。

jQuery... as you may have read already, is nothing but a nicely put together set of javascript classes (library)...

jQuery ...正如你可能已经阅读过的,只不过是一个很好的组合javascript类(库)......

Even though jquery has its own syntax, imho, you should learn javascript, or at least the fundamentals, in order to understand how jquery brings that magic to the game.

即使jquery有自己的语法,imho,你应该学习javascript,或者至少是基础知识,以便了解jquery如何为游戏带来魔力。

jquery.com for tutorials.

jquery.com的教程。

good luck

#7


Classic ASP and ASP.Net are both server side technologies, which output HTML etc to the client browser.

经典ASP和ASP.Net都是服务器端技术,它们将HTML等输出到客户端浏览器。

JavaScript is a client side technology, and JQuery is a framework written in JavaScript, so will work on any web page (provided the browser supports it).

JavaScript是一种客户端技术,JQuery是一个用JavaScript编写的框架,因此可以在任何网页上工作(只要浏览器支持它)。

Therefore the answer is certainly yes.

因此答案肯定是肯定的。

#8


I use JQuery in a classic ASP website.

我在一个经典的ASP网站上使用JQuery。

It works very well. Where needed I can put some ASP stuff into javascript blocks to use stuff from database:

它工作得很好。在需要的地方我可以把一些ASP东西放到javascript块中来使用来自数据库的东西:

function myjavascripfunction(){
  $("#pageTitle").html(<%= rs("Title")%>);
}

Using JQuery with ASP is great if you are unskilled in classic ASP and don't want to waste too much time on it.

如果你不熟悉经典ASP并且不想浪费太多时间,那么在ASP中使用JQuery是很棒的。

PS: There's a ASP-to-JSON library that allows you to convert DB queries into JSON objects. Great for making .html pages that do ajax calls on .asp pages who's only job is to retrieve some stuff from the DB.

PS:有一个ASP-to-JSON库,允许您将数据库查询转换为JSON对象。非常适合制作.html页面,在.asp页面上执行ajax调用,他们唯一的工作就是从数据库中检索一些东西。

This way you have a reuseable .html page that you can just copy paste when you switch to another serverside language. All you'd need to do is make some .php or .aspx pages that also return JSON and call those instead of the .asp ones.

这样,您就可以使用可重复使用的.html页面,只需在切换到另一种服务器端语言时复制粘贴即可。您需要做的就是制作一些返回JSON的.php或.aspx页面,然后调用那些而不是.asp。

#9


jQuery does not depend on the server (ASP.NET), it is client-side. You can use any technology on the server you like and still use jQuery.

jQuery不依赖于服务器(ASP.NET),它是客户端的。您可以在您喜欢的服务器上使用任何技术,仍然使用jQuery。

#1


jQuery is a javascript framework and should in no way interfere with your classic ASP.

jQuery是一个javascript框架,不应该干扰你的经典ASP。

jQuery can be used on the client side but can only work with what it has available/can request.

jQuery可以在客户端使用,但只能使用它可用/可以请求的内容。

#2


I'm using Mootools on the server end as well as the client end, JScript ASP rocks! :)

我在服务器端和客户端使用Mootools,JScript ASP摇滚! :)

#3


Yes, it is. ASP simply pre-processes and outputs HTML, which can be manipulated through javascript. (Or jQuery)

是的。 ASP只是预处理和输出HTML,可以通过javascript操作。 (或jQuery)

#4


I don't see why not, jQuery is a client-side library built on top of JavaScript, what are you planning on doing with jQuery?

我不明白为什么不,jQuery是一个基于JavaScript构建的客户端库,你打算用jQuery做什么?

#5


jQuery can be used in any web application. Also in your static HTML pages.

jQuery可以在任何Web应用程序中使用。也在您的静态HTML页面中。

It is basically a client side javascript framework which helps you in manipulating the DOM and many other functions.

它基本上是一个客户端javascript框架,可以帮助您操作DOM和许多其他功能。

#6


I couldnt believe somebody asked this question :) ... with all respect.

我无法相信有人问过这个问题:) ......我非常尊重。

Remember, PHP, ASP, ASP.NET, ASP.NET MVC, CGI.... at the end, they render HTML code back to the client aka browser. this has to "read" this code and do the magic of displaying it on the screen.

请记住,PHP,ASP,ASP.NET,ASP.NET MVC,CGI ....最后,他们将HTML代码渲染回客户端即浏览器。这必须“读取”这段代码,并在屏幕上显示它。

Javascript is a "browser side" aka client-side language that is used to manipulate "browser side" objects (DOM). Javascript has been a nightmare for most web developers because browsers don't "read" it the same way. Thanks god Netscape is almost gone forever because it was one of the worst to deal with.

Javascript是一种“浏览器端”,也就是客户端语言,用于操纵“浏览器端”对象(DOM)。 Javascript一直是大多数Web开发人员的噩梦,因为浏览器不会以相同的方式“读取”它。感谢神Netscape几乎永远消失,因为它是最糟糕的处理之一。

jQuery... as you may have read already, is nothing but a nicely put together set of javascript classes (library)...

jQuery ...正如你可能已经阅读过的,只不过是一个很好的组合javascript类(库)......

Even though jquery has its own syntax, imho, you should learn javascript, or at least the fundamentals, in order to understand how jquery brings that magic to the game.

即使jquery有自己的语法,imho,你应该学习javascript,或者至少是基础知识,以便了解jquery如何为游戏带来魔力。

jquery.com for tutorials.

jquery.com的教程。

good luck

#7


Classic ASP and ASP.Net are both server side technologies, which output HTML etc to the client browser.

经典ASP和ASP.Net都是服务器端技术,它们将HTML等输出到客户端浏览器。

JavaScript is a client side technology, and JQuery is a framework written in JavaScript, so will work on any web page (provided the browser supports it).

JavaScript是一种客户端技术,JQuery是一个用JavaScript编写的框架,因此可以在任何网页上工作(只要浏览器支持它)。

Therefore the answer is certainly yes.

因此答案肯定是肯定的。

#8


I use JQuery in a classic ASP website.

我在一个经典的ASP网站上使用JQuery。

It works very well. Where needed I can put some ASP stuff into javascript blocks to use stuff from database:

它工作得很好。在需要的地方我可以把一些ASP东西放到javascript块中来使用来自数据库的东西:

function myjavascripfunction(){
  $("#pageTitle").html(<%= rs("Title")%>);
}

Using JQuery with ASP is great if you are unskilled in classic ASP and don't want to waste too much time on it.

如果你不熟悉经典ASP并且不想浪费太多时间,那么在ASP中使用JQuery是很棒的。

PS: There's a ASP-to-JSON library that allows you to convert DB queries into JSON objects. Great for making .html pages that do ajax calls on .asp pages who's only job is to retrieve some stuff from the DB.

PS:有一个ASP-to-JSON库,允许您将数据库查询转换为JSON对象。非常适合制作.html页面,在.asp页面上执行ajax调用,他们唯一的工作就是从数据库中检索一些东西。

This way you have a reuseable .html page that you can just copy paste when you switch to another serverside language. All you'd need to do is make some .php or .aspx pages that also return JSON and call those instead of the .asp ones.

这样,您就可以使用可重复使用的.html页面,只需在切换到另一种服务器端语言时复制粘贴即可。您需要做的就是制作一些返回JSON的.php或.aspx页面,然后调用那些而不是.asp。

#9


jQuery does not depend on the server (ASP.NET), it is client-side. You can use any technology on the server you like and still use jQuery.

jQuery不依赖于服务器(ASP.NET),它是客户端的。您可以在您喜欢的服务器上使用任何技术,仍然使用jQuery。