duanniu3385 2015-01-10 07:24
浏览 54

将css属性插入数据库

How would I add the properties of css, in this case the left and top of an element into php so I can reuse them again as the css properties?

for example: use

<input id = "enter" name="enter" style = "top: 20;float: left;width: 300px;">

to enter the left and top to the database, this isn't how you do it but it would be something life

    $input = (empty($_POST['enter'])) ? : $_POST['enter'] ;

but with something like

    $input = (empty($_POST['enter'].style.top)) ? : $_POST['enter'] ;

so I could reuse them later on and say something like

    <input id = "enter" name="enter" style = "$input,float: left;width: 300px;">

What is the closest thing to this, or how could I accomplish this?

  • 写回答

1条回答 默认 最新

  • dongya6997 2015-01-10 07:35
    关注

    Nothing about the style attribute will be sent to the server by default.

    If you want to pass that information then you will have to do so explicitly.

    For example, you could use JavaScript to read the data and generate (with createElement, appendChild, etc.) hidden input element in the form.

    评论

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程