小编mgr*_*aph的帖子

php从右到左反向发送电子邮件

我有电子邮件:ue.aporue.lraporue@otlatnom-dratta.nhoj

我希望它像:

john.attard-montalto@europarl.europa.eu

当我使用revWords('ue.aporue.lraporue@otlatnom-dratta.nhoj');我得到:

eu.europa.europarl@montalto-attard.john

function revWords($string) {
    //We need to find word boundries
    $wordChars = 'abcdefghijklmnopqrstuvwxyz';
    $buffer = '';
    $return = '';
    $len = strlen($string);
    $i = 0;
    while ($i < $len) {
        $chr = $string[$i];
        if (($chr & 0xC0) == 0xC0) {
            //UTF8 Characer!
            if (($chr & 0xF0) == 0xF0) {
                //4 Byte Sequence
                $chr .= substr($string, $i + 1, 3);
                $i += 3;
            } elseif (($chr & 0xE0) == 0xE0) {
                //3 Byte Sequence
                $chr …
Run Code Online (Sandbox Code Playgroud)

php string reverse

0
推荐指数
1
解决办法
239
查看次数

Jquery在3个div上切换

HTML:

<div id="bottomContent" class="bottom_content" > <p>First Content</p> </div>

<div id="bottomContent2" class="bottom_content" > <p>second Content</p> </div>

<div id="bottomContent3" class="bottom_content" > <p>Third Content</p> </div>
Run Code Online (Sandbox Code Playgroud)

JS:

   $("div.one").click (function(){
      $("#bottomContent2").hide();
      $("#bottomContent3").hide();
      $("#bottomContent").animate({width: "toggle"}, 1000);
    });

    $("div.two").click (function(){
       $("#bottomContent").hide();
       $("#bottomContent1").hide();
       $("#bottomContent2").animate({width: "toggle"}, 1000);
    });

    $("div.three").click (function(){
       $("#bottomContent").hide();
       $("#bottomContent2").hide();
       $("#bottomContent3").animate({width: "toggle"}, 1000);
    });
Run Code Online (Sandbox Code Playgroud)

我有以下jQuery代码,当单击每个div时,它将为其自己的相应div项设置动画并关闭可能已经打开的任何其他div但我相信有更好的方法来编码它并使其比我已经做好了.任何帮助将不胜感激.

jquery toggle

0
推荐指数
1
解决办法
6305
查看次数

不触发OnClick事件IE8但在Firefox中工作正常

  var hyp = document.createElement("a");
  //hyp.style.cssText='cursor:pointer';
  hyp.onclick="RemoveDv('" + divid + "');";    
  hyp.innerHTML = "Remove";
Run Code Online (Sandbox Code Playgroud)

我在那里有这个代码snippit的javascript.在Firefox中一切正常,但在IE8中,如果我在本地运行它可以正常工作,但是将代码上传到服务器并通过我在本地运行它的同一个IE8浏览器运行RemoveDv事件将不会触发.

这是从这个javascript创建的html

<a style="cursor: pointer;" onclick="RemoveDv('dv1');">
Run Code Online (Sandbox Code Playgroud)

html javascript

0
推荐指数
1
解决办法
571
查看次数

用于检查url是否有效的函数

嗯..我想检查网址是否有效.

所以,他们不能只输入之类的东西hoadw,adwij£1%但插入的URL必须像一个有效的domain.com.

想到这样的功能:

function checkurl($url) { 
   if ($url = "VALID") {  
      return true;  
   }else{  
      return false;
   }
}
Run Code Online (Sandbox Code Playgroud)

php url

0
推荐指数
1
解决办法
1911
查看次数

标签 统计

php ×2

html ×1

javascript ×1

jquery ×1

reverse ×1

string ×1

toggle ×1

url ×1