把颜色放在javascript警报上 [英] put color on javascript alert
本文介绍了把颜色放在javascript警报上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
heyyy ....
我有一个javascript用于显示警告信息...
我可以放一个红色在文字显示........
这里是我的剧本
< script 类型 = text / javascript >
$(function(){
$('#<% = fluNotice.ClientID %> ')。change(function(){
var fileExtension = ['jpg','jpeg','png' ,'gif','bmp','doc','pdf','docx','txt'];
if($ .inArray($(this).val()。split('。' ).pop()。toLowerCase(),fileExtension)== -1){
alert(只有'.jpg','。jpeg','。png','。gif','。bmp' ,'。doc','。pdf','。docx','。txt'格式都是欠)。
document.getElementById('<% = fluNotice.ClientID %> ')。 value =;
fluNotice.focus();
}
})
})
< / script >
我希望警报文字以红色显示..你可以帮助它
解决方案
(function(){
< blockquote>('#<% = fluNotice.ClientID %> ')。change(function( ){
var fileExtension = ['jpg','jpeg','png','gif','bmp','doc','pdf','docx','txt'];
if(
.inArray(
heyyy....
I have a javascript for showing the alert message...
can I put a red color on the text showing........
here is my script
<script type="text/javascript">
$(function() {
$('#<%=fluNotice.ClientID %>').change(function() {
var fileExtension = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'doc', 'pdf', 'docx', 'txt'];
if ($.inArray($(this).val().split('.').pop().toLowerCase(), fileExtension) == -1) {
alert("Only '.jpg','.jpeg','.png','.gif','.bmp','.doc','.pdf','.docx','.txt' formats are allowed.");
document.getElementById('<%=fluNotice.ClientID%>').value = "";
fluNotice.focus();
}
})
})
</script>
I want the alert text show in red color..can u help it
解决方案
(function() {
('#<%=fluNotice.ClientID %>').change(function() { var fileExtension = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'doc', 'pdf', 'docx', 'txt']; if (
.inArray(
这篇关于把颜色放在javascript警报上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文