电信在陆家嘴软件园2号楼的这栋楼值多少钱

Control.ProcessCmdKey Method (Message, Keys) (System.Windows.Forms)
ProcessCmdKey Method
Expand the table of content
Control.ProcessCmdKey Method (Message, Keys)
.NET Framework (current version)
Processes a command key.Namespace:
System.Windows.Forms (in System.Windows.Forms.dll)
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
[SecurityPermissionAttribute(SecurityAction.InheritanceDemand,
Flags = SecurityPermissionFlag.UnmanagedCode)]
protected virtual bool ProcessCmdKey(
ref Message msg,
Keys keyData
A , passed by reference, that represents the window message to process. keyData
One of the
values that represents the key to process.
true if the character was proc otherwise, false.This method is called during message preprocessing to handle command keys. Command keys are keys that always take precedence over regular input keys. Examples of command keys include accelerators and menu shortcuts. The method must return true to indicate that it has processed the command key, or false to indicate that the key is not a command key. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control.The ProcessCmdKey method first determines whether the control has a , and if so, enables the
to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's ProcessCmdKey method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys.When overriding the ProcessCmdKey method in a derived class, a control should return true to indicate that it has processed the key. For keys that are not processed by the control, the result of calling the base class's ProcessCmdKey method should be returned. Controls will seldom, if ever, need to override this method.for the immediate caller and inheriting classes to call this method. Associated enumeration: .
.NET Framework
Available since 1.1
IN THIS ARTICLE
Is this page helpful?
Additional feedback?
1500 characters remaining
Thank you!
We appreciate your feedback.php---关于js函数document.onkeydown()在各种浏览器中调用的支持问题
-----------------------------------------谢谢你的关注---------------------------------------------
==================================================================================================&&&
今天在做一个BUG测试:点击提交按钮后,将相关的表单数据进行提交,在IE浏览器下是可以的,但是在FireFox或Google浏览器中(我机子上就只装了这几种浏览器,其他浏览器是什么情况,具体的我也不知道了)提交不了,你再怎么点击提交按钮,它就是不鸟你,老是在那里蠢蠢不动;之前也是遇到过类似的情况,将button
的onclick = "submit()"事件的调用函数
function submit()
document.getElementsByName("button3")(0).click();//采用getElementsByName("Button3")(0)来获取对象
function submit()
$('#button').click();&&&&&&
//采用$('#Button_save')运用某个控件的id号来获取对象
就行了;今天遇到点击按钮没反应的情况,自然会联想到之前出现这种情况的原因,想应该也是类似的;但是一打开源代码来看,获取对象的方式居然也是通过id号来实现的,相关代码如下:
按钮的HTML代码---&td&&input
type="button" value="Check" onclick="check()"
class="button"&&/td&
被调用的函数check()代码如下
function check()
&&& var comment
= $('#comment' + idx).val();
&&& comments =
escape(comment);
param_href = "comment=
window.location.href = '../lib/check_handle.php?' +
那怎么办呢?我只好在函数首行添加alert('success!');
function check()
alert('success!');
&&& var comment
= $('#comment' + idx).val();
&&& comments =
escape(comment);
param_href = "comment=
window.location.href = '../lib/check_handle.php?' +
然后进行测试,发现还是没反应啊;怎么办?这个...这个...这个...这么怪异的现象!接着我想是不是&script&&/script&内部的代码有错?所以执行不了&script&&/script&段内的代码,我采用在&script&&/script&代码段首行添加alert('go...')来验证;点击按钮,果然还是不行;
这里调用个中断回去复习一下JavaScript脚本解释顺序:对JavaScript 的解释是 Web 浏览器的 HTML
语法分析处理的一部分;因此,如果在文档的 &HEAD&
标识中放置了一个脚本,则将在检查所有的 &BODY&
标识之前加以解释;如果在 &BODY& 标识中将创建对象,但由于在分析处理
&HEAD& 标识时这些对象尚不存在,因而不能被脚本操作。
到这里,虽然找到了问题是在&script&&/script&代码段内有错,可是偌大的代码,怎么找啊?犹如海底捞针啊...
即时,我到Google上去搜,有关firefox不兼容的JavaScript代码问题;结合自己的代码,并寻了许久,终于发现自己有一个函数的调用与网上提供的许多问题中的某一个问题类似---document.onkeydown的调用问题,原来的代码是
function&&&
document.onkeydown()
{&&&&&&&&&&&&&&&
if(event.keyCode==13)
&&& return
document.onkeydown = function()
if(event.keyCode == 13) {
&&& return
后,再进行测试.....天哪!它居然有反应了,它终于活过来了,它终于理我了...不容易啊.希望看过这篇文章的人,在以后的开发过程中能避免类似我这样问题的产生!
==================================================================================================
以下是摘抄的网上一篇文章《常见firefox不支持的JavaScript问题》,希望你能从中得到你想要的东东...
如cards/CardAdmin/ExportMemData.vm页面
要检查页面的脚本是否闭合({}完整),是否有某个方法不正确所引起的。
---------------------------------------------------------------------------------------------
scm/ProductAdmin/ProductList.vm
&a href="#"
onclick="ChildNode(this);"&aaa&/a&要改为
&a href="#"
onclick="ChildNode(event);"&aaa&/a&
无法取得this对象,要用以下方法来取得。
function ChildNode(e)
var evt = e ? e : (window.event ? window.event : null);
//此方法为了在firefox中的兼容
var node = evt.srcElement ? evt.srcElement : evt.
//evt.target在火狐上才能识别用的。
selectNode = node.getAttribute("nodeId").toString();
scm/ProductAdmin/LoadTree.vm页面上不
nodeId属性不支持,要node.getAttribute("nodeId");
还有var+=elements[i].innerText在firefox中无识别,用elements[i].innerHTML来支持即可。
------------------------------------------------------------------------------------------------
时间控件不在firefox显示出来问题。是少了个id的值,必须加上才能显示出来。
&input type="text" name="insertDate" id="insertDate"
value="$!{insertDate}" nodeId="asss"/&
如出现在控件中的nodeId属性,要用getAttribute("nodeId");方法来取得对象的属性,不能用object.nodeId来
获取,firefox不支持这种属性。
有些地方的控件要加上id才会被识别出来,注意要加上。
-------------------------------------------------------------------------
//cards/Stock/checkin.vm页面上
//url这样写在firefox中无法读取。在firefox中无法识别url这个变量。IE是可以。
//var url=[{D:bizsDiv,L:'../stock/suppliers.page?'}];
//这是一个访问下拉框的方法,注意ele.option();中的圆括号firefox不支持,只能用[];才行。
var ele = document.getElementByIdx_x_x('bizName');
idv = ele.option[ele.selectedIndex].
---------------------------------------------------------------------------
cards/EmployeeAdmin/AddEmployee.vm
页面中的$(ctl.id+'msg').innerText =中firefox不支持innerText这个属性,
要改为$(ctl.id+'msg').innerHTML =就可以由firefox支持这个属性。
---------------------------------------------------------------------------------
//在火狐中的地址栏输入:about:config,会出现火狐的参数配置设置,
---------------------------------------------------------------------------------
document.all在火狐中无法被识别,用document.getElementByIdx_x_x,document.getElementByName等来替换即可。
----------------------------------------------------------------------------------------
//CSM/ProductAdmin/ProductList.page
//文件浏览的文本内容清理方法;unselectalbe:用于设置只读属性。on/off:两个值。
&input type="file" name="pic" id="pic"
onchange="checkpic(this);" UNSELECTABLE="on"/&
function checkpic(here)
var reg_pic=/\w+(\.gif|\.jpg){1}/;
if(!reg_pic.test(here.value))
alert("");
here.outerHTML +=
"";//用于清除浏览框中的内容,here.value="";是无法执行的。IE支持这个方法
here.value = ""; //IE不支持这个属性,firefor却支持。
//在赋值时要注意outerHTML用+=,value用=。
//用来清除file中的内容;
&input type="file"
id="file1"/&&input type="button"
onclick="addfile();"/&
function addfile(){
document.all('file1').select();
document.selection.clear()
----------------------------------------------------
//cards/Stock/checkin.vm
//用来判断是IE或者FireFox
//用来判断浏览器的类型。
function IsBrowser()
if(window.ActiveXObject){
isBrowser = "IE";
}else if(window.XMLHttpRequest){
isBrowser = "FireFox";
return isB
//在firefox中firstChild方法无效,用childNodes[]来代替。
var tableobj = document.getElementByIdx_x_x('products');
var rvobj = document.getElementByIdx_x_x('sto');
var delall = document.getElementByIdx_x_x('delall');
if(IsIE == "IE")
tableobj.firstChild.removeChild(rvobj);
tableobj.firstChild.removeChild(delall);
if(IsIE == "FireFox")
tableobj.childNodes[1].removeChild(rvobj);
tableobj.childNodes[1].removeChild(delall);
出现这firstChild无法读取问题
这样的话firefox中无tableobj.firstChild就读取为空。
要这样&table&&tbody&&tr&&td&&/td&&/tr&&/tbody&&/table&
在firefox中tableobj.firstChild就可以读取出&tbody&来,
所以在firefox中空白的也算一个节点。(要特别注意)
----------------------------------------------------------------------
//cards/diffSale/CouponManage.vm(行36,删除优惠券分组)
那个只是把click和onclick联系起来而已,而楼主期望的是通过脚本点击链接访问url,
Firefox里&a&没有click()这个默认动作,从这条路上是走不通的了。
但是,何不用document.location.href=url来实现?
--------------------------------------------------------------------------
//cards/Customer/GiftExchange.vm
&input type="text" name="InteGral" value="InteGral"
id="InteGral"/&
$('InteGral').value=
火狐对大小写要求比较严格,
如果是IE$('integral').value=是可以取得值的。
----------------------------IE不兼容问题----------------------------------------------
在程序中需要动态的创建一个复选框并在页面上显示,但是用document.getElementsByName()取的时候却取不到,
经测试,在firefox和opera中是完全能够取到的,看来又是ie的问题了
又试着创建了一个div,还是取不到,看来不光是表单元素有这个问题
解决方式:用document.getElementsByTagName
---------------------------------------------------------------------------
//会有打印的效果document.execCommand('print'),window.print();也有同样的效果。window.print()会在FireFox中兼容,而
document.exeCommand('print');会在FireFox有不兼容问题。
----------------------------------------------------------------------------------------------
//这种写法在firefox中不支持会有错误出现。
function document.onkeydown
var er = event.srcE
if(event.keyCode == 13)
document.getElementId('subform').click();
//只能这样写
document.onkeydown = function()
var er = event.srcE
if(event.keyCode == 13)
document.getElementId('subform').click();
--------------------------------------------------------------------------------------------------------
//eval的使用。IE中是可以用来取对象的一种方法,FireFox不支持这个。
&input type="text"
id="submitText"/&
function subeval_r()
//IE中可以用来取得对象
var whileEl = eval_r('submitText');
alert(whileEl.type);
-----------------------------------------------------------------------------------------------------
///cards/MerchantMember/Settlement.page
//all在IE中支持,火狐不支持的,用elements可以两个都支持。
function clearForm(input){
var form = input.
if(form != null && form !=
undefined){
//var elements = form. IE支持。读取表单下的元素。
var elements = form.
for(var i=0;i&elements.i++){
with(elements[i]){
if(elements[i].type == undefined || name == input.name)
if(type == 'text'){
value = '';
}else if(type == 'radio'){
}else if(type == 'select-one'){
selectedIndex = 0;
this.checked =
-----------------------------------------------------------------------------------------------------
//火狐上的用调试的小问题。alert();的使用
alert();当里面没有参数时会在火狐中无法运行,IE可以。
alert('');有参数火狐才会执行,在火狐调试时要特别注意。
-----------------------------------------------------------------------------------------------------
event.srcElement从字面上可以看出来有以下关键字:事件,源 他的意思就是:当前事件的源,
我们可以调用他的各种属性 就像:document.getElementByIdx_x_x(”")这样的功能,
经常有人问 firefox 下的 event.srcElement 怎么用,在此详细说明:
IE下,event对象有srcElement属性,但是没有target属性;Firefox下,event对象有target属性,但是没有srcElement属性.但他们的作用是相当的,即:
firefox 下的 event.target = IE 下的 event.srcElement
解决方法:使用obj(obj = event.srcElement ? event.srcElement :
event.)来代替IE下的event.srcElement或者Firefox下的event.target.
http://www.firefox.hk
IE 中可以直接使用 event 对象,而 FF 中则不可以,解决方法之一如下:
var theEvent = window.event ||
arguments.callee.caller.arguments[0];
第二种是将 event 作为参数来传递:
function xxx(e){var theEvent = window.event ||}
srcElement 和 target
在 IE 中 srcElement 表示产生事件的源,比如是哪个按钮触发的 onclick 事件,FF 中则是
var theEvent = window.event ||
arguments.callee.caller.arguments[0];
var srcElement = theEvent.srcE
if (!srcElement)
srcElement = theEvent.
document.onclick = function(e){
var theEvent = window.event ||
var srcElement = theEvent.srcE
if (!srcElement) {
srcElement = theEvent.
function clickAction(){
var theEvent = window.event ||
arguments.callee.caller.arguments[0];
var srcElement = theEvent.srcE
if (!srcElement) {
srcElement = theEvent.
function clickAction(e){
var theEvent = window.event ||
var srcElement = theEvent.srcE
if (!srcElement) {
srcElement = theEvent.
event.keyCode 和event.which
FF不支持window.event.keyCode,代替着是event.which
//在网页上面屏蔽tab键的代码
document.onkeydown = function (e){
var theEvent = window.event ||
var code = theEvent.keyCode || theEvent.
if(code == 9){
/myweb2/blog/item/041fbcd21b70ad.html
2)document.all
document.all是ie在dom标准确立之前的一个得到元素的一个集合,根据id和name,的一个元素大集合,后来DOM标准确定了,getElementById逐渐慢慢取代了all对象集的地位,但是firefox为了兼容一些为ie写的使用document.all的脚本,不得已,加入了document.all支持,但是也不支持if(document.all)判断,并且在有正确xhtml的doctype下会屏蔽使用
document.all
window.event //IE
e = window.event || e
3)判断页面加载完成
document.onreadystatechange=function(){document.readyState=="complete"}
document.addEventListener("DOMContentLoaded",handle,false)
当某一事件被触发时需要执行某个函数,在IE下可用attachEvent,在FF下则要用addEventListener。
attachEvent()有两个参数,第一个是事件名称,第二个是需执行的函数;
addEventListener()有三个参数,第一个是事件名称,但与IE事件不同的是,事件不带"on",比如"onsubmit"在这里应为"submit",第二个是需执行的函数,第三个参数为布尔值;
来源: 站长吧 -
http://www.master8.net/data//article_10074.htm
4)设置容器位置 left、top
IE:可以不用加单位px
FF:一定要加单位 px
-------------------------------------------------------------------------------------------
//一种用来输入整数的方法。
IsInt:&input type="text"
onkeyup="isInt(event);"&
//是否整型
function isInt(e)
//keyCode:IE支持,which:FF支持。
var theEvent = window.event ||
var code = theEvent.keyCode || theEvent.
if(code&48 || code&57)
//alert(code);//srcElement:IE支持,target:FF支持
var val = e.srcElement ? e.srcElement : e.
val.value = val.value.substring(0,val.value.length-1);
---------------------------------------------------------------------------------------------
// "||":也可以用来赋值,在FF中没有window.event,要对象赋对象。isInt(event);
function isInt(e)
var oEvent = e || window. //用来判断是IE或者FF,并赋值给对象。
var oTarget = oEvent.target || oEvent.srcE
//用来取IE或者FF的对象。
==================================================================================================
-----------------------------------------谢谢你的关注---------------------------------------------
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。2012年3月 总版技术专家分月排行榜第一
2013年7月 荣获微软MVP称号
本帖子已过去太久远了,不再提供回复功能。}

我要回帖

更多关于 陆家嘴写字楼出租 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信