if(navigator.appName.indexOf("Explorer") >-1){ document.getElementById('element').innerText = "my text"; " />

根据浏览器使用不同语句打开新页面的问题

来源:互联网  时间:2016/6/28 14:17:55

关于网友提出的“ 根据浏览器使用不同语句打开新页面的问题”问题疑问,本网通过在网上对“ 根据浏览器使用不同语句打开新页面的问题”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: 根据浏览器使用不同语句打开新页面的问题
描述:

buttone控件: if(navigator.appName.indexOf("Explorer") >-1){  document.getElementById('element').innerText = "my text";  } else{  document.getElementById('element').textContent = ";my text"; 
现在button控件中的onClientClick在safari浏览器下不起作用,估计要写成window.open,请问这两个怎么结合起来啊


解决方案1:

引用 13 楼 home_pc 的回复:
引用 7 楼 fennyli78 的回复:
function LoadPage() {
if (navigator.appName.indexOf("Explorer") > -1) { alert('microsoft');
window.location = "http:/……
/> 你用下面的这个语句就行了:……
window.location.href ='www.163.com' 解决方案2:


我是想写成一个函数
/>
  
  function LoadPage() {   if(navigator.appName.indexOf("Explorer") >-1){      window.top.main.AddWin('Sl/S.aspx','录入日报');  
  } else{      window.open('Sl/S.aspx','录入日报');     }      }   


上一篇懂E-R图的请进200分送上
下一篇关于Image控件的AlternateText属性
明星图片
相关文章
《 根据浏览器使用不同语句打开新页面的问题》由码蚁之家搜集整理于网络,
联系邮箱:mxgf168#qq.com(#改为@)