XMLHTTP如何在对方客户端d出网页?

XMLHTTP如何在对方客户端d出网页?,第1张

按照你的要求:

用户A在线点击client.asp上的按钮,在线网站管理员B的计算机d出窗口。前提是管理员B必须长期打开admin.htm来监测

分开4个文件。但是要注意,如果不是本地且在页面一开始就执行pop()方法。一般情况下都会被浏览器阻止。点击按钮时才执行一般都没问题。

代码如下:

admin.htm

<html><head><meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>管理员监测窗口</title></head><body>

<script language="javascript" type="text/javascript">

function pop(){

var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")

xmlhttp.open("GET", 'result.asp',true)

xmlhttp.onreadystatechange=function() {

if (xmlhttp.readyState==4) {

if(xmlhttp.responseText.indexOf('yes') >-1){window.open('yes.htm','','height=200,width=200')}

setTimeout('pop()',10000)//每10秒检查一次,可以根据需要改变数值。

}

}

xmlhttp.send(null)

}

pop()//可以在一开始就检测,如果担心会被浏览器阻止,就去掉这局,点击下边的“马上检测”按钮才监测。

</script><input type="button" name="Submit" value="马上监测" onClick="pop()" /></body>

</html>

result.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<%

Response.Expires = -1

If Application("counts") >0 then

Application("counts") = 0

Response.Write("yes")

Else

Response.Write("no")

End If

%>

yes.htm

<html><head><meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>d出窗口</title></head><body>d出窗口</body></html>

client.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<%If Request.Form("action") = "1" Then Application("counts") = 1

%>

<html><head><meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" /><title>客户端</title></head>

<body>

<form id="form1" name="form1" method="post" action="">

<input type="hidden" name="action" value="1" />

<input type="submit" name="Submit" value="提交(通知管理员)" />

</form>

</body></html>

Android 中自定义Dialog的样式,主要是通过自定义的xml,然后加载到dialog的背景中,如下步骤:

1、自定义Dialog

final Dialog dialog = new Dialog(this, R.style.Theme_dialog)

2、窗口布局

View contentView = LayoutInflater.from(this).inflate(R.layout.select_list_dialog,null)

3、把设定好的窗口布局放到dialog中

dialog.setContentView(contentView)

4、设定点击窗口空白处取消会话

dialog.setCanceledOnTouchOutside(true)

5、具体的 *** 作

ListView msgView = (ListView)contentView.findViewById(R.id.listview_flow_list)

6、展示窗口

dialog.show()

例:

final Dialog dialog = new Dialog(this,R.style.Theme_dialog)

View contentView =LayoutInflater.from(this).inflate(R.layout.select_list_dialog, null)

dialog.setContentView(contentView)

dialog.setCanceledOnTouchOutside(true)

ListView msgView = (ListView)contentView.findViewById(R.id.listview_flow_list)

TextView titleText = (TextView)contentView.findViewById(R.id.title)

titleText.setText("请选择yhk")

SelectBankCardDialogAdapter adapter =new SelectBankCardDialogAdapter(this, mBankcardList)

msgView.setAdapter(adapter)

msgView.setOnItemClickListener(newOnItemClickListener() {

@Override

public void onItemClick(AdapterViewparent, View view, int position, long id) {

//Toast.makeText(RechargeFlowToMobileActivity.this,

// position+"",0).show()

mSelectCard =mBankcardList.get(position)

String area = mSelectCard.getBank_card()

mCardNumberText.setText(area)

dialog.dismiss()

}

})

Button closeBtn = (Button)contentView.findViewById(R.id.close)

closeBtn.setClickable(true)

closeBtn.setOnClickListener(newView.OnClickListener() {

@Override

public void onClick(View v) {

dialog.dismiss()

}

})

dialog.show()

以上就是在Android开发自定义dialog样式的方法和步骤,android很多的控件都提供了接口或者方法进行样式的定义和修改。

愿我的答案 能够解决您的烦忧

那说明这个文件出错了,你可以禁止作为启动项或者彻底卸载删除

1,您出现这个d框,是说明您的启动项错误,启动过程中不能正常打开应用程序

2,解决办法很简单,在您的启动项中删除这一项,或者清理您的注册表,重新修复此应用程序都可以解决

3,如果您不会修改启动项,那么您可以下载一个腾讯电脑管家,打开腾讯电脑管家--电脑加速---一键优化---启动项---找到应用禁止启动。

如果您对我的答案不满意,可以继续追问或者提出宝贵意见,谢谢


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11287661.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-15
下一篇 2023-05-15

发表评论

登录后才能评论

评论列表(0条)

保存