你用的 是VS2005吧。如果是2005,可以建一个类,放到App_code中,然后这个类放后台方法。!
譬如你建立CommonAjaxCls.cs的类。
然后在页面中注册: AjaxPro.Utility.RegisterTypeForAjax(typeof(CommonAjaxCls));
JScript code
function showTime()
{
_CommonAjaxCls.GetDateTime(callback);
}
function callback(time)
{
var txt=document.getElementById("time");
txt.value=time.value;
}
譬如你建立CommonAjaxCls.cs的类。
然后在页面中注册: AjaxPro.Utility.RegisterTypeForAjax(typeof(CommonAjaxCls));
JScript code
function showTime()
{
_CommonAjaxCls.GetDateTime(callback);
}
function callback(time)
{
var txt=document.getElementById("time");
txt.value=time.value;
}
解决方案 »
- 求和京东一样的翻页广告代码?
- VB转Javascript
- 如何实现跑马灯?
- [ALL] 过滤 所有 IMG 标签的 ONLOAD ONCLICK 等等的 事件
- [BlueDestiny] 出道javascript的题。
- rerurn出现问题(好像是无法接收)
- asp页面中JS的个函数调用问题<循环打印图片>~~~~[一解决马上给分 帮顶也有]!!!!
- 如何实现这个函数(字符'的问题?)
- 用mail to发邮件问题!
- 请教各位,js 中如何实现类似 vbs 里的 isNumeric , isDateTime 这样的判断函数?
- response.write与 document 的用法
- 上传图片的问题
{
CommonAjaxCls.GetDateTime(callback);
}
复制错了
在html里调用外部js的时候错了。---------错误代码--------------
<script type="text/javascript" src="JScript.js"/>---------正确代码--------------
<script type="text/javascript" src="JScript.js"></script>这错误,太失败了。。