如何避免当数据包含'@'登录显示标签的链接
How to avoid from going to mail box when the data contains '@' sign in href link of display tag
如何在链接中包含" @ "符号时阻止浏览器跳转到邮箱
<display:column class="aligncenter" style="font-style: italic;"
property="conditions" sortable="true" title="Terms & Conditions"
autolink="true" href="javascript: openWindow('#')" paramId="pid"
paramProperty="pid">
</display:column>
function openWindow(pid) {
pid = pid.substring(0, pid.length - 1);
var url = "conditionpopup" + pid;
var a = navigator.appName;
if (a == "Netscape" || a == "Crome") {
var w = screen.width / 2.3;
var h = screen.height / 1.3;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
+ ", top=" + top + ", left=" + left
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
} else {
var w = screen.width / 2.3;
var h = screen.height / 1.5;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
+ ", top=" + top + ", left=" + left
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
}
}
当数据包含'@'符号时它会进入我不想要的邮箱我想让它进入我要发送的页面
请替换这个:
if (a == "Netscape" || a == "Crome") {
var w = screen.width / 2.3;
var h = screen.height / 1.3;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
+ ", top=" + top + ", left=" + left
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
} else {
var w = screen.width / 2.3;
var h = screen.height / 1.5;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
+ ", top=" + top + ", left=" + left
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
}
与这个:var h = screen.height / 1.5;
if (a == "Netscape" || a == "Crome") {
var h = screen.height / 1.3;
}
var w = screen.width / 2.3;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
window.open(url, 'condtionpopup', "width=" + w + ", height=" + h
+ ", top=" + top + ", left=" + left
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
编程时不要重复。
现在,使用这个:
window.open('http://www.google.nl#@test', 'condtionpopup', "width=" + 500 + ", height=" + 500
+ ", top=" + 50 + ", left=" + 50
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
我得到一个完美的页面弹出。没有邮件应用程序。使用我的电子邮件地址作为url只是打开一个页面,告诉我地址没有找到,因为电子邮件地址不是一个有效的url。
如果你想在新窗口中显示你的数据,你应该这样做:
// Open a blank page
myWindow = window.open('', 'condtionpopup', "width=" + w + ", height=" + h
+ ", top=" + top + ", left=" + left
+ ", resizable=no, titlebar=0,dialog=yes,location=no");
myWindow.document.write(url);
// Write your url (or other data) to this page.
删除 autolink ="真正的"在 .......
相关文章:
- 在高图表中,每x步只显示标签
- 如何隐藏和显示标签控件JavaScript
- 如何在angular js的ng应用程序中以普通的htm显示标签
- 使用细丝组tablesaw插件时未显示标签
- 用Javascript在具有相同类的按钮上显示标签
- Dijit 按钮显示图标,但不以编程方式显示标签
- 当圆形图像在圆轮中发生变化时,如何在顶部显示标签
- jqPlot - 无法使 x 轴正确显示标签
- 在堆叠条形图上显示标签
- 在酒窝气泡图中的每个气泡内显示标签
- Struts2 显示标签动态链接显示相同的行值
- HTML,显示标签的输入值
- JS sup() 在 html 中显示标签
- 如何在我的WinJS工具栏上显示标签
- d3图表宽度不会在x轴上显示标签
- 如何在鼠标悬停在条形图上时显示标签
- Select2.js-如何防止显示标签
- 我无法在JQChart中显示标签
- 使用 jQuery 验证并尝试在标签无效时突出显示标签
- 将鼠标悬停在圆上时显示标签