我被要求在本地主机上的Apache上使用自签名证书设置HTTPS,但我该如何实际做到这一点?我根本不知道.
我有几个IP地址,如:
115.42.150.37115.42.150.38115.42.150.50如果我想搜索所有3个ip地址,我应该写什么类型的正则表达式?例如,如果我这样做115.42.150.*(我将能够搜索所有3个IP地址)
我现在能做的就是:/[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}/但似乎效果不好.
谢谢.
我创建了一个Google Map API,我想在新的标签页(Window)中打开它.我可以知道我的代码有什么问题吗?我可以打开一个新标签,但我无法显示Google地图.
以下是我的代码.谢谢!
function newWindow()
{
var myLatlng = new google.maps.LatLng(0.7,40);
var myOptions =
{
zoom: 2,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
}
<A HREF="" onclick="window.open('javascript:newWindow()')" >New Map(In new window)</A>
Run Code Online (Sandbox Code Playgroud) 我创建了一系列标记.我使用这些标记来听取"点击"并将标记放在谷歌地图上,以及创建"清除所有标记","重新显示所有标记"和"删除所有标记"的功能.
问题是,我如何以一种能够一次清除或删除一个标记的方式执行此操作?原因是因为如果我偶然地在一个我不想要的地方进行策划,并且我想清除/删除它,我就无法做到.如果我要清除/删除该特定标记,我之前绘制的其他标记也将被清除/删除...
我的代码:
//Initialize the map
function initialize() {
var myLatlng = new google.maps.LatLng(2,110);
var myOptions = {
zoom: 3,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
infowindow = new google.maps.InfoWindow({
content: "loading..."
});
}
function changeForm(the_form) {
window.location = the_form;
}
//Listen for click
function marker() {
google.maps.event.addListener(map, 'click', function(event) {
addMarker(event.latLng);
});
}
// Place markers in by click
function addMarker(location) {
marker = new google.maps.Marker({
position: location,
map: map,
title:"Specified Location",
icon: 'images/greenPoint.png'
}); …Run Code Online (Sandbox Code Playgroud) 我实际上正在使用这个日历源代码,但我确实遇到了一个问题,即我无法显示今天的日期,相反,我回来了'十一月?? 110'有什么不对?!
以下是代码......
// SET ARRAYS
var day_of_week = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var month_of_year = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
// DECLARE AND INITIALIZE VARIABLES
var Calendar = new Date();
var year = Calendar.getYear(); // Returns year
var month = Calendar.getMonth(); // Returns month (0-11)
var today = Calendar.getDate(); // Returns day (1-31)
var weekday = Calendar.getDay(); // Returns day (1-31)
var DAYS_OF_WEEK = 7; // "constant" for number of days in a week
var DAYS_OF_MONTH = 31; // "constant" for number of days …Run Code Online (Sandbox Code Playgroud) 我有一个日期格式:YYYY-MM-DD,因为我们都知道这几个月只包含01,02,03,04,05,06,07,08,09,10,11,12等数字.我怎样才能真正编写一个正则表达式,只允许我获得正确的月份和日期.我只能这样做......
var date = /[0-9]{4}\-[0-9]{2}\-[0-9]{2}/;
function checkDate(Date)
{
if (date.test(Date))
{
alert("Valid Date");
}
else
{
alert("Invalid Date");
}
}
Run Code Online (Sandbox Code Playgroud)
因此,如果日期是例如2008-24-43.它仍然会返回我的有效日期.
谢谢.
javascript ×5
google-maps ×2
regex ×2
apache ×1
function ×1
html ×1
https ×1
localhost ×1
ssl ×1
string ×1