惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

博客园 - 单车骑客

安装vs2005 sp1 出现错误1718,文件未通过数字签名检查,解决方法 HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解(转载) GridView中如何做删除提示信息 GridView绑定多个参数值 - 单车骑客 - 博客园 Url重写 解决“不重新发送信息,则无法刷新新网页”的方案 - 单车骑客 - 博客园 powerdesigner将PDM转换到OOM时,code与name同时同步转换 Powerdesgner数据模型设计中,属性名同名问题的解决方法 正则表达式30分钟入门教程(转) asp.net页面生命周期 scrollWidth,clientWidth等区别 用js删除表中一行 存储过程中如何处理分页 SQL函数:分离字符串,并返回分离后字符的表 提供一个获取高精度时间类(转) SQL2005如何进行分页?? SQL中,内连接,外连接的书写格式 javascript正则表达式 下拉菜单
为新闻标题加颜色 - 单车骑客 - 博客园
单车骑客 · 2009-02-20 · via 博客园 - 单车骑客

<asp:TextBox id="txtTitle" runat="server" Height="20" CssClass="title txt300"></asp:TextBox>

<select id="selColor" style="width: 96px">
                                            <option value="" selected>默认颜色</option>
                                            <option value="#000000" style="background-color:#000000;"></option>
                                            <option value="#D2691E" style="background-color:#D2691E;"></option>
                                            <option value="#DC143C" style="background-color:#DC143C;"></option>
                                            <option value="#006400" style="background-color:#006400;"></option>
                                            <option value="#1E90FF" style="background-color:#1E90FF;"></option>
                                            <option value="#7FFFD4" style="background-color:#7FFFD4;"></option>
                                            <option value="#FFA07A" style="background-color:#FFA07A;"></option>
                                            <option value="#DCDCDC" style="background-color:#DCDCDC;"></option>
                                            <option value="#F5F5DC" style="background-color:#F5F5DC;"></option>
                                            <option value="#FFE4C4" style="background-color:#FFE4C4;"></option>
                                            <option value="#B0E0E6" style="background-color:#B0E0E6;"></option>
                                            <option value="#FF0000" style="background-color:#FF0000;"></option>                           
                                            <option value="#008000" style="background-color:#008000;"></option>
                                            <option value="#808080" style="background-color:#808080;"></option>
                                            <option value="#7CFC00" style="background-color:#7CFC00;"></option>
                                            <option value="#FFE4E1" style="background-color:#FFE4E1;"></option>
                                            <option value="#FFA500" style="background-color:#FFA500;"></option>
                                            <option value="#008080" style="background-color:#008080;"></option>
                                            <option value="#FFFFFF" style="background-color:#FFFFFF;"></option>
                                        </select>

javascript:  

          function ChangeColor(colorObj)
            {
                var filter = /<font[\s|\S]*?>(.*?)<\/font>/gi;//过滤点html标签
                var text=$("txtTitle").value;
                colorValue=colorObj.value;
                $("txtColor").value =colorValue;
                $("selColor").style.background=colorValue;
                if(text!="")
                {
                    if(filter.test(text))
                    {               
                        if(colorValue=="")
                        {
                            $("txtTitle").value=text.replace(filter,"$1");
                        }
                        else
                        {
                            $("txtTitle").value="<font color='"+colorValue+"'>"+text.replace(filter,"$1")+"</font>";
                        }
                    }
                    else
                    {
                        $("txtTitle").value="<font color='"+colorValue+"'>"+text+"</font>";
                    }
                }
            }