我可以从经典的ASP vbscript asp函数返回html吗?那PHP呢? [英] Can I return html from a classic asp vbscript asp function? What about PHP?
问题描述
我可以调用经典ASP vbscript函数并使它返回html吗?我有一个函数,可以进行一些计算,但是我也希望它也可以发送回html.会做到吗?
Can I call a Classic ASP vbscript function and have it return html? I have a function that does some calculations, but I want it to send back the html as well. Will it do that? .
response.write MyFunction()
function myFunction()
return "<b>test</b>"
end function
我收到类型不匹配错误.
I get a type mismatch error.
请问第二个问题,如果这是php,我可以发回html并做类似echo MyPHPFunction()的事情吗?
Second question, please, If this were php, can I send back html and do something like echo MyPHPFunction()?
我不知道php是否与此上的asp/vbscript不同.看来您可以在php中发送几乎所有内容.
I didn't know if php was different than asp/vbscript on this. It seems you can send just about anything around in php.
谢谢.
推荐答案
在vb脚本中,将返回值分配给函数名称;像这样的东西:
In vb script, assign the return value to the function name; something like this:
function myFunction()
myFunction = "<b>test</b>"
end function
这篇关于我可以从经典的ASP vbscript asp函数返回html吗?那PHP呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!