设置Bootstrap,Foundation或其他一些图书馆4警报消息框 [英] Setting Up Bootstrap, Foundation, Or Some Other Sort Of Library 4 alert messagebox

查看:75
本文介绍了设置Bootstrap,Foundation或其他一些图书馆4警报消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我目前正在一家购物网站上网上订餐。我有许多功能正常工作。

但现在我正在研究一些额外的细节。我想添加像Bootstrap或Foundation这样的东西,但我之前从未这样做过。

是否像jquery一样添加它?只是在页面中添加了脚本链接?我对学习bootstrap或其他一些可以让你的网站反应灵敏,更专业的图书馆非常感兴趣。



Ok这是我想要使用某些东西的主要原因像这样。

现在我有一个函数确定时间是什么,如果它是在上午10点之前该函数没有警告用户或做任何事情,但如果是在上午10点之后用户是在他被允许下订单之前警告他的食物。现在,如果您在截止时间之后订购食物,您将无法在当天收到食物。将有一个选项,以便您明天可以获得它。我有一个窗口弹出,你可以按下确定或否,这将决定你是否下订单。

现在这个弹出的消息框/警告看起来不是很好,实际上这是非常难看的所有股票都没有什么特别的。

我想使用bootstrap或其他来源为用户在一个精美的盒子里制作一个消息框或某种警报。

使用某种类型的库可以增加一些东西,我也有兴趣听取其他建议。

有人愿意向我解释如何设置bootstrap或基础?此外,如果您知道如何使用消息框,就像我使用它的方式使其外观和工作更好,我想听听您的意见。





Hello everybody,
I am currently working on a shopping website for online ordering at a restaurant. I have many features working as they should.
But now I am looking into some extra detail. I want to add something like Bootstrap or Foundation, but I have never done this before.
Is adding it like jquery? Just having a script link added to your page? I am very interested in learning bootstrap or some other library that can make your site very responsive and more professional.

Ok Here is the main reason why I want to use something like this.
Right now I have a function determining what the time is, if it is before 10 am the function does not warn the user or do anything, but if it is after 10 a.m. the user is warned about his food before he is allowed to place and order. Right now if you order the food after the cutoff time you will not be allowed to receive that food on the current day. There will be an option so that you can get it tomorrow. I have a window pop up that you can ether press ok or no and that will determine whether you place an order or not.
Right now this messagebox / alert that pops up does not look very nice, actually it is very ugly and all stock with nothing special.
I would like to use bootstrap or some other source to make a messagebox or some sort of alert in a fancy box for the user.
Using some kind of library can spice things up a bit, I am also interested in hearing other suggestions.
Will someone be willing to explain to me how to setup bootstrap or foundation? Also if you know how to use a messagebox like the way I am using it to make it look and work a lot better I would like to hear what you have to say.


function determineCutoffTime() {
	    var cutoffTime = new Date();
	    var actualtime = new Date(cutoffTime.getFullYear(), cutoffTime.getMonth(), cutoffTime.getDate(), 10, 0, 0, 0) - cutoffTime;
	    if (actualtime < 0) {
	        console.log("It's after 10 A.M");
	        var errorCutoffTime = $('#validOrder').innerHTML = "Order must be placed before 10 A.M. to receive food today." // document.getElementById("validOrder").innerHTML
	        if (window.confirm("Do you want to place your order for tomorrow?")) {
	            //make lunchbag
	            makeLunchBag();
	        }
	    } else {
	        console.log("It's before 10 A.M.");
	        //make lunchbag
	        makeLunchBag();
	    }
	}

推荐答案

' #validOrder')。innerHTML = 必须下订单在上午10点之前收到食物。 // document.getElementById(validOrder)。innerHTML
if window .confirm( 您想在明天下订单吗?)){
// make lunchbag
makeLunchBag();
}
} 其他 {
console .log( 早上10点之前);
// make lunchbag
makeLunchBag();
}
}
('#validOrder').innerHTML = "Order must be placed before 10 A.M. to receive food today." // document.getElementById("validOrder").innerHTML if (window.confirm("Do you want to place your order for tomorrow?")) { //make lunchbag makeLunchBag(); } } else { console.log("It's before 10 A.M."); //make lunchbag makeLunchBag(); } }


这篇关于设置Bootstrap,Foundation或其他一些图书馆4警报消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆