如何在C#中发送JavaScript函数 [英] how send javascript function in c#

查看:62
本文介绍了如何在C#中发送JavaScript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

function enterword() {
	$.ajax({
		type: 'POST',
		url: '/xxx/postme/',
		data: 'word='+$('#word').val()+'&r='+(new Date().getTime()),
		success: function(html) {
			if (html == 'error') {
				$('#entererror').show()
				//setTimeout('window.location="/xxx/sss/"', 3000)
				window.location="/fff/fff/"
			} else
				$('#forajax').html(html)
		}
	})
}



从c#中如何调用此funcrion



How from c# call this funcrion

推荐答案

.ajax({ 类型:' POST', 网址:' /xxx/postme/', 数据:' word =' +
.ajax({ type: 'POST', url: '/xxx/postme/', data: 'word='+


(' #word').val()+ ' & r =' +( 日期().getTime()), 成功:功能(html){ 如果(html == ' 错误' ){
('#word').val()+'&r='+(new Date().getTime()), success: function(html) { if (html == 'error') {


(' #entererror').show( ) // setTimeout('window.location ="/xxx/sss/"',3000) 窗口.位置 = " /fff/fff/" } 其他
('#entererror').show() //setTimeout('window.location="/xxx/sss/"', 3000) window.location="/fff/fff/" } else


这篇关于如何在C#中发送JavaScript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆