当前位置: 首页 > news >正文

公司网站建设 费用入账哈尔滨做网站的价格

公司网站建设 费用入账,哈尔滨做网站的价格,导航网站链接怎么做,过界女主个人做网站的现在我们来实现一键删除所有空格的功能。 一、使用原有的代码来实现#xff0c;测试效果并不理想 在这之前我们已经为String对象编写了一个使用正则表达式来删除所有空格的方法#xff1a; //功能#xff1a;删除字符串中的所有空格 //记录#xff1a;20230726创建 Stri…现在我们来实现一键删除所有空格的功能。 一、使用原有的代码来实现测试效果并不理想 在这之前我们已经为String对象编写了一个使用正则表达式来删除所有空格的方法 //功能删除字符串中的所有空格 //记录20230726创建 String.prototype.eliminateSpace function() {return this.replace(/\s*/g,); }我们使用它构建了一个测试网页 !DOCTYPE HTML HTML headmeta http-equivContent-Type contenttext/html; charsetutf-8 /meta nameAuthor contentPurpleEndurertitle公文一键排版系统/title /head body fieldset stylewidth: 1100px;legend实时编辑区/legendiframe ideditor width1200px height400px styleborder: solid 1px;/iframe /fieldset Pinput typebutton idbtnDelBlank value删除空格 onclickedRichBody.innerTextdelBlankText(edRichBody.innerText); stylebackground:#9999cc; color:white; border-radius: 25px; / /pp调试信息/p textarea idtaDbg stylewidth: 1225px; height: 200px调试信息/textareascriptconst edRich document.getElementById(editor); const taDbg document.getElementById(taDbg); var edRichDoc; var edRichBody;if (typeof(edRich) ! undefined){edRichDoc edRich.contentWindow.document;edRichDoc.designMode on;edRichDoc.contentEditable true;edRichBody edRichDoc.body;edRichBody.innerHTML pa hrefhttp://blog.csdn.net/purpleendurerhttp://blog.csdn.net/purpleendurer/a/pp/pp stylefont-family:方正小标宋简体;font-size:22pt; text-align:center; line-height:28pt;p aligncenter styletext-align:center;text-indent:24.0pt;line-height:28.0ptspan langEN-US stylefont-size:22.0pt;font-family:方正小标宋简体;mso-hansi-font-family:黑体;color:blackSQL/spanspan stylefont-size:22.0pt;font-family:方正小标宋简体;mso-hansi-font-family:黑体;color:black注入基础span langEN-USo:p/o:p/span/span/pp styletext-indent:2em;河池市××局、 市×× 局 /pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;font-family:黑体;color:black一、span langEN-USSQL/span注入分类span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxbspan stylefont-size:16.0pt;font-family:楷体_GB2312;color:black一什么是span langEN-USSQL/span注入span langEN-US?o:p/o:p/span/span/b/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan langEN-US stylefont-size:16.0pt;font-family:仿宋_GB2312;color:blackSLQ/spanspan stylefont-size:16.0pt;font-family:仿宋_GB2312;color:black注入span langEN-US(/span英文span langEN-US: Sqlinject)/span当span langEN-USweb/span应用向后台数据库传递span langEN-USSQL/span语句进行数据库操作时如果对用户输入的参数没有经过严格的过滤那么用户可以构造特殊的span langEN-USsq1/span语句从而带入到数据库中执行获取或修改数据库中的数据。span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;color:blacknbsp;nbsp;1.加强技术学习。一要span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;color:blacknbsp;nbsp;2.强化安全保障。一要。span langEN-USo:p/o:p/span/span/pp附件河池市××关于××××××××××××××××××××××××××××××××××××××××××××××××××的通知/pp附件:河池市××关于××的通知/pp附件河池市××关于××的通知。/pp附件1.河池市××关于××的通 知/pp附件1河池市××关于××××的通 知 /pp2河池市××关于×× ××的通 知 /pp3河池市××关于×× ××的通 知/pp测试1/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0px河池市××××局/pp2023年7月22日/pp测试2/pp广西壮族自治区河池市××××局/pp2023年7月22日/pp测试3/pp河池市××局/pp2023年7月22日/pp测试4/pp河池市×局/pp2023年7月22日/pp附件/pp附件标题/pp附件/pp附件标题/pp附 件/pp附件标题/p; } else {window.alert(undefined); } //功能删除字符串中的所有空格 //记录20230726创建 String.prototype.eliminateSpace function() {return this.replace(/\s*/g,); }//功能删除给字符串中的所有半角和全角空格 //输入p字符串 //输出删除所有半角和全角空格后的字符串 //记录20230804创建 function delBlankText(p) {return p.eliminateSpace();//return p.eliminateBlank(); }//delBlankTextfunction showSrc() {if (btnShowSrc.value显示源码){edRichBody.innerText edRichBody.innerHTML;//edRichBody.innerText edRichBody.innerHTML.replace(/p,/pchr(10)); //edRichBody.innerText edRichBody.innerText.replace(\/p,\/pchr(10)chr(13)); btnShowSrc.value 显示预览;btnShowSrc.style.background cyan;}else{edRichBody.innerHTML edRichBody.innerText;//edRichBody.innerHTML edRichBody.innerText.replace(chr(10)chr(13),);btnShowSrc.value 显示源码;btnShowSrc.style.background yellow;} } /script /body /html 其中通过点击“删除空格”按钮 来将edRichBody.innerText中的空格 删除 input typebutton idbtnDelBlank value删除空格 onclickedRichBody.innerTextdelBlankText(edRichBody.innerText); stylebackground:#9999cc; color:white; border-radius: 25px; / 运行效果如下 空格确实都去掉了但多段文字变成一行文字因为在正则表达式中\s除了匹配空格也匹配制表符和换行符。 二、从新出发构建新方法删除全角、半角空格和制表符 那么我们需要再写一个删除半角空格、全角空格和制表符的方法 //功能删除字符串中的所有半角和全角空格 //记录20230805创建 String.prototype.eliminateBlank function() {return this.replace(/  \t/g,); } 再进行测试 !DOCTYPE HTML HTML headmeta http-equivContent-Type contenttext/html; charsetutf-8 /meta nameAuthor contentPurpleEndurertitle公文一键排版系统/title /head body fieldset stylewidth: 1100px;legend实时编辑区/legendiframe ideditor width1200px height400px styleborder: solid 1px;/iframe /fieldset Pinput typebutton idbtnDelBlank value删除空格 onclickedRichBody.innerTextdelBlankText(edRichBody.innerText); stylebackground:#9999cc; color:white; border-radius: 25px; /input typebutton idbtnShowSrc value显示源码 onclickshowSrc() stylebackground:yellow; border-radius: 25px; / /pp调试信息/p textarea idtaDbg stylewidth: 1225px; height: 200px调试信息/textareascriptconst edRich document.getElementById(editor); const taDbg document.getElementById(taDbg); var edRichDoc; var edRichBody;if (typeof(edRich) ! undefined){edRichDoc edRich.contentWindow.document;edRichDoc.designMode on;edRichDoc.contentEditable true;edRichBody edRichDoc.body;edRichBody.innerHTML pa hrefhttp://blog.csdn.net/purpleendurerhttp://blog.csdn.net/purpleendurer/a/pp/pp stylefont-family:方正小标宋简体;font-size:22pt; text-align:center; line-height:28pt;p aligncenter styletext-align:center;text-indent:24.0pt;line-height:28.0ptspan langEN-US stylefont-size:22.0pt;font-family:方正小标宋简体;mso-hansi-font-family:黑体;color:blackSQL/spanspan stylefont-size:22.0pt;font-family:方正小标宋简体;mso-hansi-font-family:黑体;color:black注入基础span langEN-USo:p/o:p/span/span/pp styletext-indent:2em;河池市××局、 市×× 局 /pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;font-family:黑体;color:black一、span langEN-USSQL/span注入分类span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxbspan stylefont-size:16.0pt;font-family:楷体_GB2312;color:black一什么是span langEN-USSQL/span注入span langEN-US?o:p/o:p/span/span/b/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan langEN-US stylefont-size:16.0pt;font-family:仿宋_GB2312;color:blackSLQ/spanspan stylefont-size:16.0pt;font-family:仿宋_GB2312;color:black注入span langEN-US(/span英文span langEN-US: Sqlinject)/span当span langEN-USweb/span应用向后台数据库传递span langEN-USSQL/span语句进行数据库操作时如果对用户输入的参数没有经过严格的过滤那么用户可以构造特殊的span langEN-USsq1/span语句从而带入到数据库中执行获取或修改数据库中的数据。span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;color:blacknbsp;nbsp;1.加强技术学习。一要span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;color:blacknbsp;nbsp;2.强化安全保障。一要。span langEN-USo:p/o:p/span/span/pp附件河池市××关于××××××××××××××××××××××××××××××××××××××××××××××××××的通知/pp附件:河池市××关于××的通知/pp附件河池市××关于××的通知。/pp附件1.河池市××关于××的通 知/pp附件1河池市××关于××××的通 知 /pp2河池市××关于×× ××的通 知 /pp3河池市××关于×× ××的通 知/pp测试1/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0px河池市××××局/pp2023年7月22日/pp测试2/pp广西壮族自治区河池市××××局/pp2023年7月22日/pp测试3/pp河池市××局/pp2023年7月22日/pp测试4/pp河池市×局/pp2023年7月22日/pp附件/pp附件标题/pp附件/pp附件标题/pp附 件/pp附件标题/p; } else {window.alert(undefined); }//功能删除字符串中的所有空格 //记录20230726创建 //String.prototype.eliminateSpace function() //{ // return this.replace(/\s*/g,); //}//功能删除字符串中的所有半角和全角空格 //记录20230805创建 String.prototype.eliminateBlank function() {return this.replace(/  \t/g,); }//功能删除给字符串中的所有半角和全角空格 //输入p字符串 //输出删除所有半角和全角空格后的字符串 //记录20230804创建 function delBlankText(p) {//return p.eliminateSpace();return p.eliminateBlank(); }//delBlankTextfunction showSrc() {if (btnShowSrc.value显示源码){edRichBody.innerText edRichBody.innerHTML;btnShowSrc.value 显示预览;btnShowSrc.style.background cyan;}else{edRichBody.innerHTML edRichBody.innerText;btnShowSrc.value 显示源码;btnShowSrc.style.background yellow;} } /script /body /html 代码运行效果如下 测试发现半角、全角空格都被删除了但HTML代码nbsp;代表的空格并没有被删除。 三、再写一个删除HTML代码 nbsp;代码的空格的方法  所以我们还要为String对象再写一个删除HTML代码nbsp;代表的空格的方法  //功能删除字符串中的nbsp; //记录20230805创建 String.prototype.eliminateNbsp function() {return this.replace(/nbsp;/ig,); } 由于nbsp;是HTML的代码所以要同时修改“删除空格”按钮 的功能代码 input typebutton idbtnDelBlank value删除空格 onclickedRichBody.innerTextdelBlankText(edRichBody.innerText);edRichBody.innerHTMLdelBlankHTML(edRichBody.innerHTML) stylebackground:#9999cc; color:white; border-radius: 25px; /完整的测试代码如下 !DOCTYPE HTML HTML headmeta http-equivContent-Type contenttext/html; charsetutf-8 /meta nameAuthor contentPurpleEndurertitle公文一键排版系统/title /head body fieldset stylewidth: 1100px;legend实时编辑区/legendiframe ideditor width1200px height400px styleborder: solid 1px;/iframe /fieldset P !--input typebutton idbtnDelBlank value删除空格 onclickedRichBody.innerTextdelBlankText(edRichBody.innerText); stylebackground:#9999cc; color:white; border-radius: 25px; / //--input typebutton idbtnDelBlank value删除空格 onclickedRichBody.innerTextdelBlankText(edRichBody.innerText);edRichBody.innerHTMLdelBlankHTML(edRichBody.innerHTML) stylebackground:#9999cc; color:white; border-radius: 25px; /input typebutton idbtnShowSrc value显示源码 onclickshowSrc() stylebackground:yellow; border-radius: 25px; / /pp调试信息/p textarea idtaDbg stylewidth: 1225px; height: 200px调试信息/textareascriptconst edRich document.getElementById(editor); const taDbg document.getElementById(taDbg); var edRichDoc; var edRichBody;if (typeof(edRich) ! undefined){edRichDoc edRich.contentWindow.document;edRichDoc.designMode on;edRichDoc.contentEditable true;edRichBody edRichDoc.body;edRichBody.innerHTML pa hrefhttp://blog.csdn.net/purpleendurerhttp://blog.csdn.net/purpleendurer/a/pp/pp stylefont-family:方正小标宋简体;font-size:22pt; text-align:center; line-height:28pt;p aligncenter styletext-align:center;text-indent:24.0pt;line-height:28.0ptspan langEN-US stylefont-size:22.0pt;font-family:方正小标宋简体;mso-hansi-font-family:黑体;color:blackSQL/spanspan stylefont-size:22.0pt;font-family:方正小标宋简体;mso-hansi-font-family:黑体;color:black注入基础span langEN-USo:p/o:p/span/span/pp styletext-indent:2em;河池市××局、 市×× 局 /pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;font-family:黑体;color:black一、span langEN-USSQL/span注入分类span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxbspan stylefont-size:16.0pt;font-family:楷体_GB2312;color:black一什么是span langEN-USSQL/span注入span langEN-US?o:p/o:p/span/span/b/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan langEN-US stylefont-size:16.0pt;font-family:仿宋_GB2312;color:blackSLQ/spanspan stylefont-size:16.0pt;font-family:仿宋_GB2312;color:black注入span langEN-US(/span英文span langEN-US: Sqlinject)/span当span langEN-USweb/span应用向后台数据库传递span langEN-USSQL/span语句进行数据库操作时如果对用户输入的参数没有经过严格的过滤那么用户可以构造特殊的span langEN-USsq1/span语句从而带入到数据库中执行获取或修改数据库中的数据。span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;color:blacknbsp;nbsp;1.加强技术学习。一要span langEN-USo:p/o:p/span/span/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0pxspan stylefont-size:16.0pt;color:blacknbsp;nbsp;2.强化安全保障。一要。span langEN-USo:p/o:p/span/span/pp附件河池市××关于××××××××××××××××××××××××××××××××××××××××××××××××××的通知/pp附件:河池市××关于××的通知/pp附件河池市××关于××的通知。/pp附件1.河池市××关于××的通 知/pp附件1河池市××关于××××的通 知 /pp2河池市××关于×× ××的通 知 /pp3河池市××关于×× ××的通 知/pp测试1/pp styletext-indent:24.0pt;line-height:28.0pt;font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;word-spacing:0px河池市××××局/pp2023年7月22日/pp测试2/pp广西壮族自治区河池市××××局/pp2023年7月22日/pp测试3/pp河池市××局/pp2023年7月22日/pp测试4/pp河池市×局/pp2023年7月22日/pp附件/pp附件标题/pp附件/pp附件标题/pp附 件/pp附件标题/p; } else {window.alert(undefined); }//功能删除字符串中的所有空格 //记录20230726创建 //String.prototype.eliminateSpace function() //{ // return this.replace(/\s*/g,); //}//功能删除字符串中的所有半角和全角空格 //记录20230805创建 String.prototype.eliminateBlank function() {return this.replace(/  \t/g,); }//功能删除给字符串中的所有半角和全角空格 //输入p字符串 //输出删除所有半角和全角空格后的字符串 //记录20230805创建 function delBlankText(p) {//return p.eliminateSpace();return p.eliminateBlank(); }//delBlankText//功能删除字符串中的nbsp; //记录20230805创建 String.prototype.eliminateNbsp function() {return this.replace(/nbsp;/ig,); }//功能删除HTML字符串中的nbsp; //输入p字符串 //输出删除所有nbsp;后的HTML字符串 //记录20230804创建 function delBlankHTML(p) {//alert(p);return p.eliminateNbsp(); }//delBlankTextfunction showSrc() {if (btnShowSrc.value显示源码){edRichBody.innerText edRichBody.innerHTML;btnShowSrc.value 显示预览;btnShowSrc.style.background cyan;}else{edRichBody.innerHTML edRichBody.innerText;btnShowSrc.value 显示源码;btnShowSrc.style.background yellow;} } /script /body /html 代码运行的效果如下 四、美中不足待改进的地方 我们现在可以一键删除所有的半角和全角空格以及制表符了但原有的一些排版格式如字体大小、对齐方式也同时被删除了能否在删除空格的同时保存原有排版格式呢
http://wiki.neutronadmin.com/news/329353/

相关文章:

  • 网站建设如何记账网站保持排名
  • 手机 pc网站模板软件如何开发制作
  • 马来西亚的网站后缀seo优化大公司排名
  • 手机网站数据加载如何自己开发app软件
  • 厦门 网站建设公司口碑营销的例子
  • 重庆网站公司设计方案莱芜金点子今天最新招聘
  • 宜城做网站旅游电子商务网站策划书
  • 兰州专业网站建设公司益田附近网站建设
  • 网站开发售后服务协议校园网站建设硬件采购
  • 做暧动漫视频在线观看网站任丘网站制作
  • 惠州网站推广排名wordpress话题活动插件
  • 化妆品网站开发流程和进度安排网站建设毕业设计任务书
  • 男做直播网站好2017免费网站空间
  • 网站不显示内容吗wordpress 弹窗浮动层
  • 济南网站建设的方案郓城微信网站建设
  • 未央免费做网站专门做单页的网站
  • 网站开发字体的引用网站开发 哪家好
  • 秦皇岛网站开发详情页模板免费套用
  • 网站手册Wordpress 外链图片6
  • 网站建设可以自己建设服务器吗企业年报网上申报流程
  • 广州建设网站哪个好chrome谷歌浏览器官方下载
  • 网站开发网页权限如何控制服装设计公司图片
  • 网站的跟目录会计实帐培训
  • 江西省建设协会网站做网站用什么系统好
  • 网站站群做网站 带宽 多少钱
  • 昆明企业网站的建设c 在网站开发方面有优势吗
  • 邯郸市哪里有做网站的个人发布信息免费推广平台
  • php网站开发参考文献js网站变灰色代码
  • 邯郸做网站网络公司公司vi设计什么意思
  • 做纯静态网站怎么样辽宁城市建设职业技术学院教育网站