if you know the ActiveX security settings are low enough on the client machines, try<script> function pressKey(sKey) { oShell=new ActiveXObject ("WScript.Shell"); oShell.SendKeys (sKey); } </script> <input value="123132"> <input type="button" value="press" onclick="pressKey('^f')">
as far as I know, you have to use the above method, but it requires the security settings being very low, otherwise, you have to use window.findText to find/highlight the words yourself, see http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/findtext.asp
为什么不行啊?
=======错了,上的问题应该是用鼠点击某按钮时产生ctrl+f的动作。如何实现?=====
=======错了,上的问题应该是用鼠点击某按钮时产生ctrl+f的动作。如何实现?=====
=======错了,上的问题应该是用鼠点击某按钮时产生ctrl+f的动作。如何实现?============错了,上的问题应该是用鼠点击某按钮时产生ctrl+f的动作。如何实现?=====
=======错了,上的问题应该是用鼠点击某按钮时产生ctrl+f的动作。如何实现?=====
=======错了,上的问题应该是用鼠点击某按钮时产生ctrl+f的动作。如何实现?=====
function pressKey(sKey)
{
oShell=new ActiveXObject ("WScript.Shell");
oShell.SendKeys (sKey);
}
</script>
<input value="123132">
<input type="button" value="press" onclick="pressKey('^f')">
IE自带的不是有个ctrl+f弹出查找对话框吗?我在.net帮助里面找了,可是找不
到他的命令,也就是document.execCommand('print');中的print不知用什么代替,
请问各路好汉如何解决?
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/findtext.asp
function pressKey(sKey)
{
oShell=new ActiveXObject ("WScript.Shell");
oShell.SendKeys (sKey);
}
</script>赞同思归这个方法, 但有IE安全权限限制.
非要调用IE自带的查询框,我也想不到好方法了. 你可以做个弹出窗口,用JS模拟查询效果.