web汲取

作者: 然亦伞 | 来源:发表于2017-06-13 14:32 被阅读15次

基础:

1、href 属性值是 URL,或者 JavaScript 表达式、方法和函数的列表。
<a href="javascript:deleteProduct('shoppingProduct_06')">
2、onblur Form事件属性 元素失去焦点时触发,用于表单验证。与 onfocus 属性相反。
事件属性有window、form、mouse、keyboard、media 。
<input id="pwd" type="password" class="login_content_input" onFocus="pwdFocus()" onBlur="pwdBlur()">
3、

<a> 标签创建判断按钮

<a style="color: #fff" 
                                                        onclick="if (confirm('确定要退出吗?')) return true; else return false;" 
                                                        href="{$smarty.const.__MODULE__}/Manager/logout" target=_top>退出系统</a>

二级联动菜单:

//二级联动初始化
function init()
{
    //获取name=province和name=city的元素对象
    var province = document.form1.province;
    var city = document.form1.city;
    //指定province中<option>标记的个数,添加多少个空的<option>标记
    var len = arr_province.length;
    province.length = len;
    //循环写入省份数据
    for(var i=0;i<len;i++)
    {
        province.options[i].text = arr_province[i];
        province.options[i].value = arr_province[i];
    }
    //更改省份的默认选择项
    var index = 3;
    province.selectedIndex = index;
    //********************************************************************
    //指定city中<option>标记的个数,添加多少个空的<option>标记
    var len = arr_city[index].length;
    city.length = len;
    //循环写入对应城市数据
    for(var i=0;i<len;i++)
    {
        city.options[i].text = arr_city[index][i];
        city.options[i].value = arr_city[index][i];
    }
}

//当省份下拉列表被修改,相应城市列表中的数据也要相应变化
function change_select(index)
{
    //获取name=city的元素对象
    var city = document.form1.city;
    //指定city中<option>标记的个数,添加多少个空的<option>标记
    var len = arr_city[index].length;
    city.length = len;
    //循环写入对应城市数据
    for(var i=0;i<len;i++)
    {
        city.options[i].text = arr_city[index][i];
        city.options[i].value = arr_city[index][i];
    }
}

$("input[name='company_name']").val("");
$("input[type=radio][name=subject_type][value='2']").attr("checked",'checked');

//html与php交互。html里的if语句

 <foreach name="list" item="vo">
                <tr>
                    <td align="center">{$vo.create_time}</td>
                    <td>{$vo.cnname}</td><!--国际化用的各种语言均查出了-->
                    <td>{$vo.shop_name}</td>
                    <td>{$vo.user_id}</td>

                    <td>{$vo.phone}</td>
                    <!--<td>{$vo.merchant_level}</td>-->
                    <!--<td>{$vo.merchant_level}-->
                    </td>
                    <!--<td>{$vo['is_recommend']}-->
                    </td>
                    <!--<td>{$vo.follower_count}</td>-->
                    <td <?php if($vo['review_status']==L('REVIEWING')) echo 'style="color:red;"';?>>
                        {$vo['review_status']}
                    </td>
                    <td align="center">
                        <button type="button" class="btn-link detail" >{:L('MERCHANT_DETAIL')}</button>
                        <?php if($vo['review_status']==L('VERIFY_PASS')):?>
                        <button type="button" class="btn-link edit">{:L('EDIT')}<tton>
                        <?php endif;?>
                        <!--<button type="button" class="btn-link point_detail" >{:L('PIONT_DETAIL')}</button>-->
                    </td>
                    <td>{$vo['creator']}</td>
                </tr>
            </foreach>
<?php if($info['subject_type']==1):?>
                <tr>
                    <th width="30%">{:L('OBJ_TYPE')}</th>
                    <td width="70%">{:L('COMPANY')}</td>
                </tr>
                <tr>
                    <th width="30%">{:L('COMPANY_NAME')}</th>
                    <td width="70%"><?php echo $info['company_name']?></td>
                </tr>
                <tr>
                    <th width="30%">{:L('BUSINESS_LICENSE_NO')}</th>
                    <td width="70%"><?php echo $info['business_id']?></td>
                </tr>
                <?php else:?>
                <tr>
                    <th width="30%">{:L('OBJ_TYPE')}</th>
                    <td width="70%">{:L('PERSONAL')}</td>
                </tr>
                <tr>
                    <th width="30%">{:L('NAME')}</th>
                    <td width="70%"><?php echo $info['company_name']?></td>
                </tr>
                <tr>
                    <th width="30%">{:L('ID_CARD')}</th>
                    <td width="70%"><?php echo $info['id_number']?></td>
                </tr>
                <?php endif;?>

及时监测input输入

 //监测兑换积分数量输入框
  $("input[name='point_number']").on("input",function () {});

//获取当前日期

 var d = new Date();
 var day = d.getDate();

多层div叠加显示并居中(div做假弹出框)

#alertDiv{
            position:absolute;
            top:0;
            left:0;
            right:0;
            bottom:0;
            display:none;
        }

        #bankInfoDiv{
            border:1px solid #999;
            background-color:#FFF;
            border-radius:5px;
            position:absolute;
            top:50%;
            left:50%;
            margin-left:-230px;
            margin-top:-135px;
            width:460px;
            height:270px;
            padding:10px 10px;

        }
//半透明背景
.bgDiv{
            position:absolute;
            top:0;
            left:0;
            right:0;
            bottom:0;
            background-color:#666;
            opacity:0.5;
        }

table分隔线设置

<table border="0" cellspacing="0" cellpadding="0"></table>
 table{
            width:100%;
            border-right:1px solid #999;
            border-bottom:1px solid #999;
        }
        table td{
            text-align:center;
            padding-left:5px;
            padding-right:5px;
            font-size:14px;
            border-left:1px solid #999;
            border-top:1px solid #999;
            height: 30px;
        }

<a>标签调用php方法

<a class="btn btn-danger" href="{:U('Eunion/merchantReview')}">{:L('CLEAR')}</a>

form表单请求调用php方法

    <form  class="request" method="post" action="{:U('Eunion/exportMerchantReviewList')}" onsubmit="return check()">
        <input type="hidden" name="request"  value="{:I('request.begin_time')},{:I('request.end_time')},{:I('request.create_time')},{:I('request.status')},{:I('request.region')},{:I('request.key_type')},{:I('request.key_word')}">
    </form>

表单内详情按钮的点击处理

//详情页面
        $(".detail").on('click',function () {
            var id = $(this.parentNode.parentNode).find("td").eq(3).text();
            var region = $(this.parentNode.parentNode).find("td").eq(1).text();
            var reviewIndex = layer.open({
                title:"{:L('DETAIL')}",
//                    skin: 'layui-layer-demo', //样式类名
                shift: 2,
                type:2,
                area: ['860px', '650px'],
                shadeClose: false,
                content: "{:U(reviewDetail)}&id="+id+"&region="+region
            });

//                layer.open({
//                    skin: 'layui-layer-demo', //样式类名
//                    shift: 2,
//                    shadeClose: true, //开启遮罩关闭
//                    content: html
//                });
        })

相关文章

  • web汲取

    基础: 标签创建判断按钮 二级联动菜单: $("input[name='company_name']").val(...

  • 汲取

    如果手中的笔不能把自己释放 那么心就不能平静的喘息 这些年行走他乡,出卖年华,摄取风景 而你在原地享用天伦之乐 最...

  • 汲取

    小时候和爷爷一起干活时发现,爷爷总是会把辣椒、茄子最早出的花苞去掉,我当时觉得好可惜,本来可以早点吃到这些蔬菜的,...

  • 汲取

    每次在首页看到比较吸引人的文字后,我就会点进去浏览一下太太们的首页。查看一些她们的文章,从当前的到以前的,一篇篇翻...

  • 汲取

    我在时间里自由穿梭 从每一个路人眼里 汲取生活的力量 感受那金绿色的藤蔓 拂过草的尖尖 划过心坎尖尖 蓦然抬头 是...

  • 汲取

    孤独小说家,今日终于读完了。我差点觉得作者石田衣良是不是写的就是他本人的状态。 一个十年籍籍无名的小说作家,和一个...

  • 汲取

    前几日我像着魔一样的信奉着读书的重要性,可我又始终无法摆脱厌倦读书的惰性。 所以我的情绪便经常游离在渴望读书与懈怠...

  • 汲取

    能量耗尽之时 降落深山峡谷 食水,稀释花蜜 食盐,补充能量 展翅,穿越密林 来到梦想的秘境 乌吉村是栖息地 那里有...

  • 碎片10

    死亡,从叹息里汲取鼻血 死亡,从抑郁中汲取胎盘 死亡,从呼吸中汲取乳汁 死亡,从脂肪中汲取爱情

  • php汲取

    在双引号内,输出是变量的值。在单引号内,输出的是变量的名称。“{$name}” js中获取assgin传过来的数组...

网友评论

      本文标题:web汲取

      本文链接:https://www.haomeiwen.com/subject/nzmdqxtx.html