$row['fileaddr'] = '/address/img/i.img';
$extention='address/img/i.img';
$advert_status = $j['advert_status'];
// $add = '< a href="javascript:void(0)" onclick="viewFile("'.$row['fileaddr'].'", strtolower('.$extention))" target="_blank">打开 a>';
$add = '
打开 a>';
var_dump($add);exit;
$a = Html::a($model->title, Url::to(['/news/view', 'id' => $model->id]), ['class' => 'item']);
$p = Html::tag('p', date("Y-m-d", $model->publish_at));
$div = Html::tag('div', $a . $p, ['class' => 'media']);
具体应用场所
<?
php
$link = "https://www.kuaidi100.com/chaxun?com=zhongtong&nu=";
echo '<a href='.$link.$SingleNumber.' class="btn btn-info btn-sm"> 查看物流 </a>';
函数的变量名调用法2
$type = $FILE[$type];
$a = imagecreatefrom{$type}; //假如pic的类型为png,则
拼接
后的函数名为imagecreatefrompng
$a($pic); //动态调用函数
//可以在文件上传的场景当中应用,根据文件类型调用
$string = eregi_replace("http://([^
,rn]*)","\0",$string);
$string = eregi_replace("ftp://([^
,rn]*)","\0",$
的href属性中,如何实现跳转页面并传递参数?
可以使用JavaScript来实现。首先,获取input的值,然后将其
拼接
到a
标签
的href属性中,最后使用window.location.href来跳转页面。具体代码如下:
var inputVal = document.getElementById("inputId").value;
var aTag = document.getElementById("aId");
aTag.href = "targetPage.html?param=" + inputVal;
window.location.href = aTag.href;